// GET: Categories/Delete/5 public ActionResult Delete(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } IBookElementModel bookElementModel = this.bookElementService.FindById(id); IBookElementViewModel bookElementViewModel = new BookElementViewModel(bookElementModel); if (bookElementViewModel == null) { return(HttpNotFound()); } return(View(bookElementViewModel)); }
public BookElementViewModel(IBookElementModel bookElementModel) { this.Id = bookElementModel.Id; this.Name = bookElementModel.Name; }