public async Task EditAsync(QualifyQuestionEditModel model) { var item = await _repository.GetAsync(model.Id); QualifyQuestionFactory.Create(model, item, _userId); _repository.Edit(item); await _unitOfWork.SaveChangesAsync(); }
///Qualify Question Answers public async Task AddQualifyAnswersAsync(List <QualifyQuestionAnswerAddModel> model) { await _repository.DeleteAsyncQuestionAnswer(model[0].EntityId); await _unitOfWork.SaveChangesAsync(); List <QualifyQuestionAnswers> item = new List <QualifyQuestionAnswers>(); QualifyQuestionFactory.CreateQualifyAnswer(model, item); await _repository.AddQualifyAnswerAsync(item); await _unitOfWork.SaveChangesAsync(); }
public async Task AddAsync(QualifyQuestionAddModel model) { await _repository.AddAsync(QualifyQuestionFactory.Create(model, _userId)); await _unitOfWork.SaveChangesAsync(); }