public ActionResult PetRadioButtonList(Guid providerGroupId, Guid providerId, Guid?ownerId) { List <Pet> petList = new List <Pet>(); if (ownerId != null) { petList = new GetPetListByOwnerId() { OwnerId = ownerId.Value, ProviderGroupId = providerGroupId }.ExecuteList(); } return(View(petList)); }
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 })); }