/// <summary> /// Create a new ProductionReason object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="code">Initial value of the Code property.</param> /// <param name="name">Initial value of the Name property.</param> public static ProductionReason CreateProductionReason(global::System.Decimal id, global::System.String code, global::System.String name) { ProductionReason productionReason = new ProductionReason(); productionReason.ID = id; productionReason.Code = code; productionReason.Name = name; return productionReason; }
/// <summary> /// Deprecated Method for adding a new object to the ProductionReasons EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProductionReasons(ProductionReason productionReason) { base.AddObject("ProductionReasons", productionReason); }
public ActionResult _InsertReason() { CST.Prdn.Data.ProductionReason newReason = new CST.Prdn.Data.ProductionReason(); if (TryUpdateModel(newReason)) { PrdnDBContext.ProductionReasons.AddObject(newReason); PrdnDBContext.SaveChanges(); } return View(ReasonGridList()); }