public SuPageTypeLanguageModel UpdatePageTypeLanguage(SuPageTypeLanguageModel suPageTypeLanguageChanges) { var changedPageTypeLanguage = Context.DbPageTypeLanguage.Attach(suPageTypeLanguageChanges); changedPageTypeLanguage.State = Microsoft.EntityFrameworkCore.EntityState.Modified; Context.SaveChanges(); return(suPageTypeLanguageChanges); }
public IActionResult LanguageCreate(SuObjectAndStatusViewModel test3) { if (ModelState.IsValid) { var PageTypeLanguage = new SuPageTypeLanguageModel { Name = test3.SuObject.Name, Description = test3.SuObject.Description, MouseOver = test3.SuObject.MouseOver, PageTypeId = test3.SuObject.ObjectId, LanguageId = test3.SuObject.LanguageId }; _PageTypeLanguage.AddPageTypeLanguage(PageTypeLanguage); } return(RedirectToAction("LanguageIndex", new { Id = test3.SuObject.ObjectId.ToString() })); }
public SuPageTypeLanguageModel AddPageTypeLanguage(SuPageTypeLanguageModel suPageTypeLanguage) { Context.DbPageTypeLanguage.Add(suPageTypeLanguage); Context.SaveChanges(); return(suPageTypeLanguage); }