Example #1
0
        public ActionResult Create(IDtable id)
        {
            try
            {
                // TODO: Add insert logic here

                if (ModelState.IsValid)
                {
                    db.AddToIDtables(id);
                    db.SaveChanges();
                    return RedirectToAction("Index");
                }
            }
            catch(Exception ex)
            {
                ModelState.AddModelError("Error",ex);
            }
            return View();
        }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the IDtables EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToIDtables(IDtable iDtable)
 {
     base.AddObject("IDtables", iDtable);
 }
Example #3
0
 /// <summary>
 /// Create a new IDtable object.
 /// </summary>
 /// <param name="iDnumber">Initial value of the IDnumber property.</param>
 /// <param name="firstName">Initial value of the FirstName property.</param>
 /// <param name="lastName">Initial value of the LastName property.</param>
 public static IDtable CreateIDtable(global::System.Int32 iDnumber, global::System.String firstName, global::System.String lastName)
 {
     IDtable iDtable = new IDtable();
     iDtable.IDnumber = iDnumber;
     iDtable.FirstName = firstName;
     iDtable.LastName = lastName;
     return iDtable;
 }
Example #4
0
 public ActionResult Create()
 {
     IDtable id = new IDtable();
     return View(id);
 }