Domain.Models.NegocioAggregation.Negocio INegocioService.Create(Domain.Models.NegocioAggregation.Negocio negocio) { if (_negocioRep.FindBy(x => x.Titulo == negocio.Titulo && x.FunilEtapaId == negocio.FunilEtapaId).Any()) { throw new Infrastructure.Services.Core.AppException("Nome \"" + negocio.Titulo + "\" já existe."); } negocio.UsuarioCriacaoId = int.Parse(_httpContextAccessor.HttpContext.User.FindFirstValue(ClaimTypes.NameIdentifier)); _negocioRep.Add(negocio); _unitOfWork.Commit(); return(negocio); }
public void Update(Domain.Models.NegocioAggregation.Negocio funil) { throw new NotImplementedException(); }