public async Task AddAsync(vm.Category category) { dm.Category dmCategory = _mapper.Map <dm.Category>(category); await _unitOfWork.CategoryData.AddAsync(dmCategory); await _unitOfWork.SaveChangesAsync(); }
public void RemoveCategory(dm.Category category) { _context.Categories.Remove(category); }
public async Task AddAsync(dm.Category category) { await _context.Categories.AddAsync(category); }