public SuPageLanguageModel UpdatePageLanguage(SuPageLanguageModel suPageLanguageChanges)
        {
            var suPageLanguage = context.DbPageLanguage.Attach(suPageLanguageChanges);

            suPageLanguage.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
            return(suPageLanguageChanges);
        }
        public IActionResult LanguageCreate(SuObjectAndStatusViewModel FromForm)
        {
            if (ModelState.IsValid)
            {
                var PageLanguage = new SuPageLanguageModel
                {
                    Name        = FromForm.SuObject.Name,
                    Description = FromForm.SuObject.Description,
                    MouseOver   = FromForm.SuObject.MouseOver
                };
                PageLanguage.MouseOver        = FromForm.SuObject.MouseOver;
                PageLanguage.MenuName         = FromForm.SuObject.MenuName;
                PageLanguage.TitleName        = FromForm.SuObject.Title;
                PageLanguage.TitleDescription = FromForm.SuObject.PageDescription;
                PageLanguage.PageId           = FromForm.SuObject.ObjectId;
                PageLanguage.LanguageId       = FromForm.SuObject.LanguageId;

                _PageLanguage.AddPageLanguage(PageLanguage);
            }
            return(RedirectToAction("LanguageIndex", new { Id = FromForm.SuObject.ObjectId.ToString() }));
        }
 public SuPageLanguageModel AddPageLanguage(SuPageLanguageModel suPageLanguage)
 {
     context.DbPageLanguage.Add(suPageLanguage);
     context.SaveChanges();
     return(suPageLanguage);
 }