Example #1
0
        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));
 }
Example #3
0
        public void GetPhonebook_GivenValidPhonebookId_ShouldReturnPhonebook()
        {
            var result = _PhonebookService.GetPhonebook(1);

            Assert.IsNotNull(result);
        }