Ejemplo n.º 1
0
        public SuPageSectionTypeLanguageModel UpdatePageSectionTypeLanguage(SuPageSectionTypeLanguageModel suPageSectionTypeLanguageChanges)
        {
            var changedPageSectionTypeLanguage = context.DbPageSectionTypeLanguage.Attach(suPageSectionTypeLanguageChanges);

            changedPageSectionTypeLanguage.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
            return(suPageSectionTypeLanguageChanges);
        }
        public IActionResult LanguageCreate(SuObjectAndStatusViewModel test3)
        {
            if (ModelState.IsValid)
            {
                var PageSectionTypeLanguage = new SuPageSectionTypeLanguageModel
                {
                    Name              = test3.SuObject.Name,
                    Description       = test3.SuObject.Description,
                    MouseOver         = test3.SuObject.MouseOver,
                    PageSectionTypeId = test3.SuObject.ObjectId,
                    LanguageId        = test3.SuObject.LanguageId
                };

                _PageSectionTypeLanguage.AddPageSectionTypeLanguage(PageSectionTypeLanguage);
            }
            return(RedirectToAction("LanguageIndex", new { Id = test3.SuObject.ObjectId.ToString() }));
        }
Ejemplo n.º 3
0
 public SuPageSectionTypeLanguageModel AddPageSectionTypeLanguage(SuPageSectionTypeLanguageModel suPageSectionTypeLanguage)
 {
     context.DbPageSectionTypeLanguage.Add(suPageSectionTypeLanguage);
     context.SaveChanges();
     return(suPageSectionTypeLanguage);
 }