public IActionResult getPostType(DataTablesParam param) { int totalNo = 0, recordFilter = 0; var obj = postType.GetPostTypes( param.sSearch, param.iDisplayStart, param.iDisplayLength, out totalNo, out recordFilter ); var newObj = obj.Select(c => new { id = c.Id, gname = c.PostName }); return(Json(new { data = newObj, eEcho = param.sEcho, iTotalDisplayRecords = recordFilter, iTotalRecords = totalNo })); }
public ActionResult <List <PostTypeDto> > Get() { return(Ok(_service.GetPostTypes())); }