public void Update(int id, UpdateGoodCategoryDto dto) { var category = _context.GoodCategories.Find(id); category.Title = dto.Title; _context.SaveChanges(); }
public async Task Update(int id, UpdateGoodCategoryDto dto) { var category =await _GoodCategoryRepository.GetGoodCategoryByIdAsync(id); category.Title = dto.Title; await _unitOfWork.CompleteAsync(); }
public async Task Update(int id, UpdateGoodCategoryDto dto) { var goodCtagory = await _goodCategoryRepository.FindById(id); if (goodCtagory == null) { throw new Exception(); } goodCtagory.Title = dto.Title; _unitOfWork.Complete(); }
public async Task UpdateGoodCategory(int id, UpdateGoodCategoryDto dto) { var category = await GetCategory(id); if (category == null) { throw new Exception(); } category.Title = dto.Title; _unitOfWork.Complete(); }
public async Task EditGoodCategoryInfo(int id, UpdateGoodCategoryDto dto) { await _service.UpdateGoodCategory(id, dto); }