public async Task <IHttpActionResult> GetPhonebook(int?id = null) { if (ModelState.IsValid) { var response = await PhonebookService.GetPhonebook(id); return(Ok(response)); } return(BadRequest(ModelState)); }
public ActionResult <Phonebook> Get(int id) { return(_phonebookService.GetPhonebook(id)); }
public void GetPhonebook_GivenValidPhonebookId_ShouldReturnPhonebook() { var result = _PhonebookService.GetPhonebook(1); Assert.IsNotNull(result); }