public LoteValidation(ILoteInfrastructure loteInfrastructure) { _loteInfrastructure = loteInfrastructure; RuleFor(x => x.Descripcion).NotNull().NotEmpty().WithMessage("Debe especificar una descripcion al lote."); RuleFor(x => x.Descripcion).Must(DescripcionDuplicada).WithMessage("La fecha desde debe ser mayor que la fecha actual."); }
public Lote(ILoteInfrastructure loteInfrastructure, IArticuloInfrastructure articuloInfrastructure, IUsuarioInfrastructure usuarioInfrastructure, INotificacionesInfrastructure notificacionesInfrastructure) { _loteInfrastructure = loteInfrastructure; _articuloInfrastructure = articuloInfrastructure; _usuarioInfrastructure = usuarioInfrastructure; _notificacionesInfrastructure = notificacionesInfrastructure; }