public CreateRoomDetailCommandValidator(IRoomDetailsRepositoryAsync roomDetailRepository) { this.roomDetailRepository = roomDetailRepository; RuleFor(p => p.RoomNo) .NotEmpty().WithMessage("{RoomNo} is required.") .NotNull() .MaximumLength(50).WithMessage("{RoomNo} must not exceed 5 characters.") .MustAsync(IsRoomNoUniqueAsync).WithMessage("{RoomNo} already exists."); RuleFor(p => p.NoOfBed) //.NotEmpty().WithMessage("{PropertyName} is required.") .NotNull().WithMessage("{NoOfBed} is required."); //.MaximumLength(50).WithMessage("{PropertyName} must not exceed 50 characters."); }
public UpdateRoomDetailCommandHandler(IRoomDetailsRepositoryAsync roomDetailRepository) { _roomDetailRepository = roomDetailRepository; }
public DeleteRoomDetailByIdCommandHandler(IRoomDetailsRepositoryAsync roomDetailRepository) { _roomDetailRepository = roomDetailRepository; }
public GetRoomDetailByIdQueryHandler(IRoomDetailsRepositoryAsync roomDetailRepository) { _roomDetailRepository = roomDetailRepository; }
public GetAllRoomDetailsQueryHandler(IRoomDetailsRepositoryAsync roomDetailsRepository, IMapper mapper) { _roomDetailsRepository = roomDetailsRepository; _mapper = mapper; }
public CreateRoomDetailCommandHandler(IRoomDetailsRepositoryAsync productRepository, IMapper mapper) { _productRepository = productRepository; _mapper = mapper; }