public async Task EditAsync(LeadModel model) { var lead = await _leadRepository.GetAsync(model.Id); LeadFactory.Create(model, lead, _userId); _leadRepository.Edit(lead); await _unitOfWork.SaveChangesAsync(); }
public async Task AddAsync(LeadModel model) { await _leadRepository.AddAsync(LeadFactory.Create(model, _userId)); await _unitOfWork.SaveChangesAsync(); }