public IHttpActionResult Post(Author author) { Author newAuthor = authorRepo.AddNewAuthor(author); if (newAuthor == null) { return(NotFound()); } return(Ok(newAuthor)); }
public ActionResult Create([Bind(Include = "Id,FirstName,LastName,Email,DOB,Created")] Author author) { if (ModelState.IsValid) { authorRepo.AddNewAuthor(author); return(RedirectToAction("Index")); } return(View(author)); }