Beispiel #1
0
        public void InsertManagerHtmlBlocksLang(Areas.Admin.Models.HtmlBlocksLangViewModel model)
        {
            var item = Mapper.Map <HtmlBlocks_Lang>(model);

            m_contentContext.HtmlBlocks_Lang.Add(item);
            m_contentContext.SaveChanges();
        }
Beispiel #2
0
        public void UpdateManagerHtmlBlocksLang(Areas.Admin.Models.HtmlBlocksLangViewModel model)
        {
            var query = from l in m_contentContext.HtmlBlocks_Lang
                        where l.Id == model.Id
                        select l;
            var item = query.FirstOrDefault();

            Mapper.Map(model, item);
            m_contentContext.SaveChanges();
        }