public async Task <ActionResult <IEnumerable <PhoneBook> > > Get() { var products = await _productRepository.Get(); if (products == null) { return(NotFound()); } return(Ok(products)); }
public PhoneBookOutDTO Get(int id) { var user = _phoneBookRepository.Get(id); return(UserToPhoneBookConverter(user)); }
public bool Delete(int?phoneBookId) { var entry = _phoneBookRepo.Get(u => u.Id == phoneBookId, _context); return(entry != null?_phoneBookRepo.Delete(entry, _context) : false); }