diff --git a/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/IResourceBasedReadOnlyService.cs b/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/IResourceBasedReadOnlyService.cs index 39793b5..c2563bc 100644 --- a/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/IResourceBasedReadOnlyService.cs +++ b/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/IResourceBasedReadOnlyService.cs @@ -16,6 +16,6 @@ public interface IResourceBasedReadOnlyService where TRes: class { Task> ReadAsync(int? page, int? size, string sort, string order, IDictionary filterParams); - Task ReadByIdAsync(TId id); + Task> ReadByIdAsync(TId id); } } \ No newline at end of file diff --git a/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/ResourceBasedDataManageableReadOnlyService.cs b/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/ResourceBasedDataManageableReadOnlyService.cs index 39fba51..2276b27 100644 --- a/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/ResourceBasedDataManageableReadOnlyService.cs +++ b/Wissance.WebApiToolkit/Wissance.WebApiToolkit/Services/ResourceBasedDataManageableReadOnlyService.cs @@ -30,10 +30,10 @@ public virtual async Task> ReadAsync(int? page, int? size, st return new PagedDataDto(pageNumber, result.Data.Item2, PagingUtils.GetTotalPages(result.Data.Item2, pageSize), result.Data.Item1); } - public virtual async Task ReadByIdAsync(TId id) + public virtual async Task> ReadByIdAsync(TId id) { OperationResultDto result = await Manager.GetByIdAsync(id); - return result.Data; + return result; } public IModelManager Manager { get; set; }