예제 #1
0
        public async Task <TableDataModel> LoadDataAsync(TaskInfoRequestModel model)
        {
            string conditions = "";

            if (!model.Key.IsNullOrWhiteSpace())
            {
                conditions += $"where Name like '%@Key%'";
            }

            return(new TableDataModel
            {
                count = await _repository.RecordCountAsync(conditions),
                data = await _repository.GetListPagedAsync(model.Page, model.Limit, conditions, "Id desc", new
                {
                    Key = model.Key,
                }),
            });
        }