public JsonResult GetPetList(GetPetListByOwnerId getPetListByOwnerId) { var result = getPetListByOwnerId.ExecuteList().Select(x => new { Id = x.Id, Name = x.Name, OwnerId = x.OwnerId, Weght = x.Weight, DOB = x.DOB, Breed = x.Breed.Name }); return(this.Json(new { result = result }, JsonRequestBehavior.AllowGet)); }
public JsonResult _GetPetListByOwner(GetPetListByOwnerId getPetListByOwner) { var petList = getPetListByOwner.ExecuteList(); return(this.Json(new { result = petList })); }