public async Task <ActionResult> DeleteConfirmed(Guid id)
        {
            Phototechnics phototechnics = await db.Phototechnicses.FindAsync(id);

            db.Routes.Remove(phototechnics);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "ID,Shortcut,Format,Name")] Phototechnics phototechnics)
        {
            if (ModelState.IsValid)
            {
                db.Entry(phototechnics).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(phototechnics));
        }
        public async Task <ActionResult> Create([Bind(Include = "ID,Shortcut,Format,Name")] Phototechnics phototechnics)
        {
            if (ModelState.IsValid)
            {
                phototechnics.ID = Guid.NewGuid();
                db.Routes.Add(phototechnics);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(phototechnics));
        }
        public async Task <ActionResult> Delete(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Phototechnics phototechnics = await db.Phototechnicses.FindAsync(id);

            if (phototechnics == null)
            {
                return(HttpNotFound());
            }
            return(View(phototechnics));
        }
        // GET: /PhototechnicsModel/Details/5
        public async Task <ActionResult> Details(string shortcut)
        {
            if (string.IsNullOrEmpty(shortcut))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Phototechnics phototechnics = await _context.Phototechnicses.SingleOrDefaultAsync(x => x.Shortcut == shortcut);

            if (phototechnics == null)
            {
                return(HttpNotFound());
            }
            return(View(phototechnics));
        }
 protected virtual ActionResult View(Phototechnics model)
 {
     return(View("Details", model));
 }