Example #1
0
        public async Task EditAsync(LeadModel model)
        {
            var lead = await _leadRepository.GetAsync(model.Id);

            LeadFactory.Create(model, lead, _userId);
            _leadRepository.Edit(lead);
            await _unitOfWork.SaveChangesAsync();
        }
Example #2
0
        public async Task AddAsync(LeadModel model)
        {
            await _leadRepository.AddAsync(LeadFactory.Create(model, _userId));

            await _unitOfWork.SaveChangesAsync();
        }