예제 #1
0
        public async Task <JsonResult> GetPets(int clienteId)
        {
            var pets = await _animal.GetAllAsync(x => x.ClienteId == clienteId);

            return(Json(pets.Select(x => new
            {
                x.Id,
                nome = x.Nome
            }).OrderBy(x => x.nome)));
        }