public void UpdateLookupCategory(LookupCategoryDTO lookupCategoriesDTO) { var objLookupCategory = Entities.LookupCategories.Where(x => x.LookupCategoryId == lookupCategoriesDTO.LookupCategoryId).First(); objLookupCategory.CategoryName = lookupCategoriesDTO.CategoryName; objLookupCategory.ModifedDate = DateTime.Now; Entities.Entry(objLookupCategory).State = EntityState.Modified; Entities.SaveChanges(); }
public void AddNewLookupCategory(LookupCategoryDTO lookupCategoryDTO) { lookupCategoryDTO.ModifedDate = lookupCategoryDTO.CreatedDate; var lookupCategory = Mapper.Map <LookupCategoryDTO, LookupCategory>(lookupCategoryDTO); Entities.LookupCategories.Add(lookupCategory); Entities.Entry(lookupCategory).State = EntityState.Added; Entities.SaveChanges(); }
public void UpdateLookupCategory(LookupCategoryDTO lookupCategoryDTO) { LookupCategoryManager.UpdateLookupCategory(lookupCategoryDTO); }
public void AddNewLookupCategory(LookupCategoryDTO lookupCategoriesDTO) { LookupCategoryManager.AddNewLookupCategory(lookupCategoriesDTO); }