Example #1
0
 public JsonResult List()
 {
     return(this.Json(
                new
     {
         Result = (from per in personalService.GetAll()
                   join u in userService.GetAll() on per.Id equals u.PersonalId
                   join a in authorityService.GetAll() on u.AuthorityId equals a.Id
                   select new
         {
             Id = u.Id,
             Image = per.Image,
             Name = per.Name,
             Surname = per.Surname,
             UserName = u.UserName,
             Authority = a.Name,
         })
     }, JsonRequestBehavior.AllowGet
                ));
 }