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 )); }
public JsonResult List() { return(this.Json( new { Result = (from obj in personalService.GetAll() select new { Id = obj.Id, Image = obj.Image, Name = obj.Name, Surname = obj.Surname, Phone = obj.Phone, Address = obj.Address, Salary = obj.Salary, EntryDate = obj.EntryDate.ToShortDateString() }) }, JsonRequestBehavior.AllowGet ));; }