/// <summary> /// Create a new cg_Products_Tags object. /// </summary> /// <param name="productTagId">Initial value of the ProductTagId property.</param> public static cg_Products_Tags Createcg_Products_Tags(global::System.Int64 productTagId) { cg_Products_Tags cg_Products_Tags = new cg_Products_Tags(); cg_Products_Tags.ProductTagId = productTagId; return cg_Products_Tags; }
/// <summary> /// Deprecated Method for adding a new object to the cg_Products_Tags EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTocg_Products_Tags(cg_Products_Tags cg_Products_Tags) { base.AddObject("cg_Products_Tags", cg_Products_Tags); }
public ActionResult tags_new(FormCollection collection) { var newItem = new cg_Products_Tags(); // add values newItem.Tag = collection["tag"]; newItem.Type = collection["tagType"]; // add to DB & save db.AddTocg_Products_Tags(newItem); db.SaveChanges(); return RedirectToAction("tags"); }