public ActionResult Edit(PhoneOrder phoneorder)
 {
     if (ModelState.IsValid)
     {
         db.PhoneOrders.Attach(phoneorder);
         db.ObjectStateManager.ChangeObjectState(phoneorder, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(phoneorder);
 }
        public ActionResult Create(PhoneOrder phoneorder)
        {
            if (ModelState.IsValid)
            {
                db.PhoneOrders.AddObject(phoneorder);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(phoneorder);
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the PhoneOrders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPhoneOrders(PhoneOrder phoneOrder)
 {
     base.AddObject("PhoneOrders", phoneOrder);
 }
 /// <summary>
 /// Create a new PhoneOrder object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="operatorName">Initial value of the OperatorName property.</param>
 /// <param name="phoneNumber">Initial value of the PhoneNumber property.</param>
 public static PhoneOrder CreatePhoneOrder(global::System.Int32 id, global::System.String operatorName, global::System.String phoneNumber)
 {
     PhoneOrder phoneOrder = new PhoneOrder();
     phoneOrder.id = id;
     phoneOrder.OperatorName = operatorName;
     phoneOrder.PhoneNumber = phoneNumber;
     return phoneOrder;
 }