Ejemplo n.º 1
0
 public ActionResult <Models.PhoneBook> GetPhoneBookById(long id)
 {
     try
     {
         var domainPhoneBook = _phoneBookManager.GetPhoneBook(id);
         var phoneBook       = _mapper.Map <Domain.Models.PhoneBook, Models.PhoneBook>(domainPhoneBook);
         return(Ok(phoneBook));
     }
     catch (Exception exception)
     {
         return(BadRequest(exception));
     }
 }
Ejemplo n.º 2
0
 public PhoneBook GetPhoneBook(int phoneBook)
 {
     return(_phoneBookManager.GetPhoneBook(phoneBook));
 }