Пример #1
0
 public DeleteFlowerCommandValidator(OrchideaContext context)
 {
     RuleFor(x => x.Id)
     .Must(id => context.Flowers.Any(f => f.Id == id) && id != default)
     .WithMessage("Element is not exist.")
     .NotEmpty()
     .WithMessage("Id is null or empty.");
 }
Пример #2
0
 public GetFlowersHandler(OrchideaContext context) : base(context)
 {
 }
Пример #3
0
 public DeleteFlowerCommandHandler(OrchideaContext context) : base(context)
 {
 }
Пример #4
0
 public BaseCommandHandler(OrchideaContext context)
 {
     _context = context;
 }
Пример #5
0
 protected BaseQueryHandler(OrchideaContext context) => _context = context;