public void InsertManagerCatalogBrandLang(CatalogBrandLangViewModel model) { var item = Mapper.Map <Catalog_Brands_Lang>(model); m_ContentContext.Catalog_Brands_Lang.Add(item); m_ContentContext.SaveChanges(); }
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(); }