Beispiel #1
0
        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            var componentInfo = new ComponentInformation();
            var component = new Component();
            componentInfo.ComponentName = "PSoC4";
            componentInfo.Category = 1;
            component.ComponentNumber = 10;
            component.ComponentInfoId = componentInfo.InfoId;
            addComponentWithInfo(component, componentInfo);

            return View();
        }
Beispiel #2
0
 public void addComponentWithInfo(Component component_, ComponentInformation compInfo_) 
 {
     component_.ComponentInfoId = compInfo_.InfoId;
     db.ComponentInformations.Add(compInfo_);
     db.Components.Add(component_);
     
 }