public List <DogOwner> GetAllDogOwners()
        {
            //var dogOwnerRepository = new DogOwnerRepository();
            //var dogOwnerList = dogOwnerRepository.GetAllDogOwners();

            //return dogOwnerList;
            return(_dogOwnerRepository.GetAllDogOwners());
        }
Example #2
0
 public IEnumerable <DogOwner> GetAllDogOwners()
 {
     try
     {
         return(dogOwnerRepository.GetAllDogOwners());
     }
     catch (System.Exception)
     {
         return(new List <DogOwner>());
     }
 }
Example #3
0
        public async Task <IActionResult> GetAllDogOwners()
        {
            var dogOwners = await _repository.GetAllDogOwners();

            var dogOwnerResponses = dogOwners.Select(x =>
                                                     new DogOwnerResponse(x.Id,
                                                                          x.OwnerName,
                                                                          x.DogNames));

            return(Ok(dogOwnerResponses));
        }
Example #4
0
 public List <DogOwner> GetAllDogOwners()
 {
     return(_dogOwnerRepository.GetAllDogOwners());
 }
Example #5
0
 public IEnumerable <DogOwner> GetAllDogOwners()
 {
     return(_repo.GetAllDogOwners());
 }
Example #6
0
        public List <DogOwner> GetAllDogOwners()
        {
            var dogOwnerList = dogOwnerRepository.GetAllDogOwners();

            return(dogOwnerList);
        }