Exemplo n.º 1
0
        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
            }));
        }
Exemplo n.º 2
0
 public ActionResult <List <PostTypeDto> > Get()
 {
     return(Ok(_service.GetPostTypes()));
 }