public async Task <IHttpActionResult> Put(LogPagingGetVm vm) { var count = await this.BusinessService.GetLogsCountAsync(vm.SearchTerm); var logs = await this.BusinessService.GetLogsWithPagingAsync(vm.PageIndex, vm.PageSize, vm.IsDescending, vm.SearchTerm); vm.Logs = await this.MappingService.EntityToGetVmAsync(logs); vm.Count = count; return(Ok(vm)); }
public async Task <IActionResult> Put(string id, [FromBody] LogPagingGetVm vm) { var count = await this.logQueryService.GetLogsCountAsync(vm.SearchTerm); var logs = await this.logQueryService.GetLogsWithPagingAsync(vm.PageIndex, vm.PageSize, vm.IsDescending, vm.SearchTerm); var logMappingService = new LogMappingService(); vm.Logs = await logMappingService.EntityToGetVmAsync(logs); vm.Count = count; return(Ok(vm)); }