コード例 #1
0
        public async Task <AppProductVariableSearchText> Insert(AppProductVariableSearchText appProductVariableSearchText)
        {
            await _unitOfWork.AppProductVariableSearchTextRepository.Add(appProductVariableSearchText);

            await _unitOfWork.SaveChangesAsync();

            return(appProductVariableSearchText);
        }
コード例 #2
0
        public async Task <AppProductVariableSearchText> Update(AppProductVariableSearchText appProductVariableSearchText)
        {
            var variables = await GetById(appProductVariableSearchText.Id);

            if (variables == null)
            {
                throw new Exception("Documento No existe");
            }

            _unitOfWork.AppProductVariableSearchTextRepository.Update(appProductVariableSearchText);
            await _unitOfWork.SaveChangesAsync();

            return(await GetById(appProductVariableSearchText.Id));
        }
 public void Update(AppProductVariableSearchText entity)
 {
     _context.AppProductVariableSearchText.Update(entity);
 }
        public async Task Delete(int id)
        {
            AppProductVariableSearchText entity = await GetById(id);

            _context.AppProductVariableSearchText.Remove(entity);
        }
 public async Task Add(AppProductVariableSearchText entity)
 {
     await _context.AppProductVariableSearchText.AddAsync(entity);
 }