public void Update(RequestSubCategoryDTO requestSubCategoryDTO) { var requestSubCategory = new RequestSubCategory(); requestSubCategory.Id = requestSubCategoryDTO.Id; requestSubCategory.RequestCategoryId = requestSubCategoryDTO.RequestCategoryId; requestSubCategory.SubCategoryName = requestSubCategoryDTO.SubCategoryName; _context.Entry(requestSubCategory).State = EntityState.Modified; }
public void Add(RequestSubCategoryDTO requestSubCategoryDTO) { var requestSubCategory = new RequestSubCategory(); //requestSubCategory.Id = requestSubCategoryDTO.Id; requestSubCategory.RequestCategoryId = requestSubCategoryDTO.RequestCategoryId; requestSubCategory.SubCategoryName = requestSubCategoryDTO.SubCategoryName; _context.requestSubCategories.Add(requestSubCategory); }