Example #1
0
        public void Update(int id, UpdateGoodCategoryDto dto)
        {
            var category = _context.GoodCategories.Find(id);

            category.Title = dto.Title;

            _context.SaveChanges();
        }
Example #2
0
        public async Task Update(int id, UpdateGoodCategoryDto dto)
        {
            var category =await _GoodCategoryRepository.GetGoodCategoryByIdAsync(id);

            category.Title = dto.Title;

            await _unitOfWork.CompleteAsync();
        }
Example #3
0
        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();
        }
Example #5
0
 public async Task EditGoodCategoryInfo(int id, UpdateGoodCategoryDto dto)
 {
     await _service.UpdateGoodCategory(id, dto);
 }