public ActionResult Post([FromBody] BookInVO book) { try { var _entity = book.CreateEntity(); _bookBusiness.Create(ref _entity); var _result = _entity.CreateVO <Book, BookOutVO>(); return(Accepted(_result)); } catch (Exception ex) { return(this.ReturnActionResult(ex)); } }
public ActionResult Put(long id, [FromBody] BookInVO book) { try { var _entity = book.CreateEntity(); _entity.Id = id; _bookBusiness.Update(ref _entity); var _result = _entity.CreateVO <Book, BookOutVO>(); return(Ok(_result)); } catch (Exception ex) { return(this.ReturnActionResult(ex)); } }