Ejemplo n.º 1
0
 public ActionResult EditConfig(SiteConfiguration modelConfiguration)
 {
     if (ModelState.IsValid)
     {
         db.SiteConfigurations.Attach(modelConfiguration);
         db.ObjectStateManager.ChangeObjectState(modelConfiguration, System.Data.EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("SiteConfiguration");
     }
     return View(modelConfiguration);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the SiteConfigurations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSiteConfigurations(SiteConfiguration siteConfiguration)
 {
     base.AddObject("SiteConfigurations", siteConfiguration);
 }
 /// <summary>
 /// Create a new SiteConfiguration object.
 /// </summary>
 /// <param name="configurationID">Initial value of the ConfigurationID property.</param>
 public static SiteConfiguration CreateSiteConfiguration(global::System.Int32 configurationID)
 {
     SiteConfiguration siteConfiguration = new SiteConfiguration();
     siteConfiguration.ConfigurationID = configurationID;
     return siteConfiguration;
 }
Ejemplo n.º 4
0
        public ActionResult CreateConfig(SiteConfiguration modelConfiguration)
        {
            if (ModelState.IsValid)
            {
                modelConfiguration.IsDeleted = false;

                db.SiteConfigurations.AddObject(modelConfiguration);
                db.SaveChanges();
                return RedirectToAction("SiteConfiguration");
            }
            return View(modelConfiguration);
        }