Exemplo n.º 1
0
        public async Task <IActionResult> GetDepartments(TableParameter param)
        {
            var depts = await _coreRep.GetDepartments(param.search, param.page, param.pageSize, param.orderBy, param.orderDirection, param.filter);

            var count = await _coreRep.GetDepartmentCount(param.filter);

            return(Ok(new ResponseModel(new
            {
                depts = depts.Select(u => new DepartmentModel(u)),
                total = count
            })));
        }