예제 #1
0
        //Edit Tool GET
        public IActionResult Edit(int id)
        {
            var                  thisTool       = db.Tools.FirstOrDefault(x => x.ToolId == id);
            List <Bay>           bays           = db.Bays.ToList();
            List <Certification> certifications = db.Certifications.ToList();
            ToolCreateVM         VM             = new ToolCreateVM(thisTool, bays, certifications);

            return(View(VM));
        }
예제 #2
0
        //Get Create Tool View
        public IActionResult Create()
        {
            Tool                 tool           = new Tool();
            List <Bay>           bays           = db.Bays.ToList();
            List <Certification> certifications = db.Certifications.ToList();
            ToolCreateVM         VM             = new ToolCreateVM(tool, bays, certifications);

            return(View(VM));
        }