/// <summary> /// Create a new cg_Slideshows object. /// </summary> /// <param name="slideshowId">Initial value of the SlideshowId property.</param> /// <param name="slideshowName">Initial value of the SlideshowName property.</param> /// <param name="slideshowKey">Initial value of the SlideshowKey property.</param> /// <param name="languageCode">Initial value of the LanguageCode property.</param> public static cg_Slideshows Createcg_Slideshows(global::System.Int64 slideshowId, global::System.String slideshowName, global::System.String slideshowKey, global::System.String languageCode) { cg_Slideshows cg_Slideshows = new cg_Slideshows(); cg_Slideshows.SlideshowId = slideshowId; cg_Slideshows.SlideshowName = slideshowName; cg_Slideshows.SlideshowKey = slideshowKey; cg_Slideshows.LanguageCode = languageCode; return cg_Slideshows; }
/// <summary> /// Deprecated Method for adding a new object to the cg_Slideshows EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTocg_Slideshows(cg_Slideshows cg_Slideshows) { base.AddObject("cg_Slideshows", cg_Slideshows); }
public ActionResult slideshows_new(FormCollection collection) { var newItem = new cg_Slideshows(); // add values newItem.SlideshowName = collection["SlideshowName"]; newItem.SlideshowKey = collection["SlideshowKey"]; newItem.LanguageCode = collection["LanguageCode"]; // add to DB & save db.AddTocg_Slideshows(newItem); db.SaveChanges(); return RedirectToAction("slideshows"); }