コード例 #1
0
        // 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));
        }
コード例 #2
0
 public BookElementViewModel(IBookElementModel bookElementModel)
 {
     this.Id   = bookElementModel.Id;
     this.Name = bookElementModel.Name;
 }