public ActionResult EditSiteDomain(SiteDomainModel model) { TryUpdateModel(model); if (ModelState.IsValid) { var siteDomain = new SiteDomain { Description = model.Description, Language = model.Language ?? string.Empty, PropertyType = model.PropertyType, SiteDomainID = model.SiteDomainID }; siteDomain.Set(); } return RedirectToAction("SiteBranding"); }
public ActionResult EditSiteDomain(int? siteDomainID) { var model = new SiteDomainModel(); if (siteDomainID != null) { var siteDomain = new SiteDomain(Convert.ToInt32(siteDomainID)); model.Description = siteDomain.Description; model.Language = siteDomain.Language; model.PropertyType = siteDomain.PropertyType; model.SiteDomainID = siteDomain.SiteDomainID; } return View(model); }