public ActionResult <PhoneBook> Create(PhoneBook book)
        {
            _phoneBookService.Create(book);

            return(CreatedAtRoute("GetPhoneBook", new { id = book.Id.ToString() }, book));
        }
示例#2
0
        public ActionResult <Person> Create(Person person)
        {
            _phoneBookService.Create(person);

            return(CreatedAtRoute("GetPerson", new { id = person.Id.ToString() }, person));
        }