public ServiceResponse <HeadstoneUserRole> GetIncluding(Expression <Func <HeadstoneUserRole, bool> > predicate, params object[] includes) { using (var bo = new UserRoleDAO()) { var results = bo.GetList(predicate, includes); if (results != null && results.Any()) { return(new ServiceResponse <HeadstoneUserRole>() { Type = ServiceResponseTypes.Success, Source = ServiceResponseSources.MsSQL, Result = results }); } else { return(new ServiceResponse <HeadstoneUserRole>() { Type = ServiceResponseTypes.Error, Source = ServiceResponseSources.MsSQL, Result = new List <HeadstoneUserRole>() }); } } }
public JsonResult GetList() { var lst = roledao.GetList(); return(Json(new { data = lst }, JsonRequestBehavior.AllowGet)); }