Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public JsonResult _GetPetListByOwner(GetPetListByOwnerId getPetListByOwner)
        {
            var petList = getPetListByOwner.ExecuteList();

            return(this.Json(new { result = petList }));
        }