public ValidatorUpdateCity(IReviewManagementContext context) { _context = context; RuleFor(x => x.Name) .NotEmpty(); }
public Validator(IReviewManagementContext ctx, IValidator <AddressDto> validatorAddress, IValidator <DishDto> validatorDish, IValidator <ImageDto> validatorImg, IValidator <HeaderImageDto> validatorHeaderImg) { _context = ctx; RuleForEach(x => x.Dishes) .SetValidator(validatorDish); RuleFor(x => x.Address) .SetValidator(validatorAddress); RuleForEach(x => x.HeaderImages) .SetValidator(validatorHeaderImg); RuleFor(x => x.Image) .SetValidator(validatorImg) .When(x => x.Image != null); RuleFor(x => x.Name) .NotEmpty() .MinimumLength(2); RuleFor(x => x.PhoneNumber) //.Matches(@"^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$"); .NotEmpty(); RuleFor(x => x.Address) .NotNull(); }
public ValidatorCreateRateBase(IReviewManagementContext ctx) { _context = ctx; RuleFor(x => x.Rate) .Must(x => x >= 0 && x <= 5); }
public Validator(IReviewManagementContext context) { _context = context; RuleFor(x => x.Text) .MinimumLength(15) .NotEmpty(); }
public ValidatorAddressDto(IReviewManagementContext context) { _context = context; RuleFor(x => x.Longitude) .Must(x => x >= -180.0f && x <= 180.0f); RuleFor(x => x.Latitude) .Must(x => x >= -180.0f && x <= 180.0f); RuleFor(x => x.Street) .NotEmpty(); }
public ValidatorUpdatePlace(IReviewManagementContext ctx, IValidator <ImageDto> validatorImg) { _context = ctx; RuleFor(x => x.Image) .SetValidator(validatorImg) .When(x => x != null); RuleFor(x => x.Name) .MinimumLength(2) .Custom((d, ctx) => { if (d != null && d.Length == 0) { ctx.AddFailure("'Name' can't be empty"); } }); }
public HandlerCreateBaseEntity(IReviewManagementContext context, IMapper mapper) : base(context, mapper) { }
public HandlerCreateCity(IReviewManagementContext ctx, IMapper mapper) : base(ctx, mapper) { }
public ValidatorCreatePlaceRate(IReviewManagementContext ctx) : base(ctx) { }
public HandlerCategoryUpdate(IReviewManagementContext context, IMapper mapper) : base(context, mapper) { }
public HandlerUpdateUser(IReviewManagementContext context, IMapper mapper) : base(context, mapper) { }
public HandlerGetAllBase(IReviewManagementContext context) { _context = context; }
public ValidatorCreateCity(IReviewManagementContext _context) { RuleFor(x => x.Name) .NotEmpty(); }
public JwtTokenProvider(IReviewManagementContext context, JwtSetting jwtSetting) { _dbContext = context; _jwtSetting = jwtSetting; }
public ContextTransactionBehavior(IReviewManagementContext ctx) { _context = ctx; }
public HandlerDeleteMultiplyCity(IReviewManagementContext context, IMapper mapper) : base(context, mapper) { }
public HandlerUpdateEntity(IReviewManagementContext context, IMapper mapper) { Mapper = mapper; Context = context; }
public CurrenUserContext(IReviewManagementContext reviewContext, IHttpContextAccessor httpContextAccessor) { var userId = GetUserId(httpContextAccessor.HttpContext.User); _currentUser = reviewContext.Users.FirstOrDefault(x => x.Id == userId); }
public HandlerGetAllCountry(IReviewManagementContext context) : base(context) { }
public HandlerGetCountry(IReviewManagementContext context) { _context = context; }
public HandlerDeleteCountry(IReviewManagementContext context, IMapper mapper) : base(context, mapper) { }
public HandlerCreateBase(IReviewManagementContext context, IMapper mapper) { Mapper = mapper; Context = context; }
public Handler(IReviewManagementContext context, IMapper mapper) { _mapper = mapper; _context = context; }
public UserService(IReviewManagementContext context) { _context = context; }
public HandlerCreatePlaceRate(IReviewManagementContext context, IMapper mapper) : base(context, mapper) { }
public HandlerDeleteMultyplyBase(IReviewManagementContext context, IMapper mapper) { _mapper = mapper; _context = context; }
public HandlerCreateComment(IReviewManagementContext context, IMapper mapper) : base(context, mapper) { }
public Handler(IReviewManagementContext context) : base(context) { }