public Task Handle(CreateMainCategoryCommand command) { var mainCategory = new MainCategory(command.Title, command.ImageName, command.IsActive); _mainCategoryRepository.Add(mainCategory); return(Task.CompletedTask); }
public async Task Add(CategoryDTO AddDTO) { await _mainCategoryRepository.Add(_Mapper.Map <MainCategories>(AddDTO)); await _mainCategoryRepository.Commit(); await _mainCategoryRepository.DisposeAsync(); }