예제 #1
0
        public void InsertManagerCatalogBrandLang(CatalogBrandLangViewModel model)
        {
            var item = Mapper.Map <Catalog_Brands_Lang>(model);

            m_ContentContext.Catalog_Brands_Lang.Add(item);
            m_ContentContext.SaveChanges();
        }
예제 #2
0
        public void UpdateManagerCatalogBrandLang(CatalogBrandLangViewModel model)
        {
            var query = from l in m_ContentContext.Catalog_Brands_Lang
                        where l.Id == model.Id
                        select l;
            var item = query.FirstOrDefault();

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