public async Task <ActionResult> Edit(string shortcut) { if (shortcut == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Photoshop photoshop = await _context.Photoshops.SingleOrDefaultAsync(x => x.Shortcut == shortcut); if (photoshop == null) { return(HttpNotFound()); } return(View(photoshop.As <PhotoshopEditModel>())); }
public async Task <ActionResult> ProductDetails(string shortcut) { if (shortcut == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Photoshop photoshop = await _context.Photoshops.SingleOrDefaultAsync(x => x.Shortcut == shortcut); if (photoshop == null) { return(HttpNotFound()); } this.SetTheme(photoshop); var model = photoshop.As <PhotoshopViewModel.Summary>(); // model.Categorieses = _context.Categories.ToList().As<IList<CategoryViewModel>>(); return(View(model)); }