public ServerSideValidator(IDotnetAccessControlDbContext context) { RuleFor(x => x.Model).SetValidator(new ClientSideValidator()); RuleFor(x => x.Model.Name).MustAsync(NameShouldBeUnique); RuleFor(x => x.Model.PageId).MustAsync(MustBeValidPage); _context = context; }
public ServerSideValidator(IDotnetAccessControlDbContext context) { RuleFor(x => x.Model).SetValidator(new CLientSideValidator()); RuleFor(x => x.Model.Id).MustAsync(ShouldBeValidId); RuleFor(x => x.Model.Address).MustAsync(ShouldBeValidAddress); _context = context; }
public AssignRoleToPageHandler(GenericRoleToResourceHandler genericRoleToResourceHandler, IMediator mediator, IDotnetAccessControlDbContext context) { _genericRoleToResourceHandler = genericRoleToResourceHandler; _mediator = mediator; _context = context; }
public ServerSideValidator(IDotnetAccessControlDbContext context) { RuleFor(x => x.Model).SetValidator(new ClientSideValidator()); RuleFor(x => x.Model.Name).MustAsync(NameShouldBeUnique); When(x => x.Model.ParentMenuId != null, () => { RuleFor(x => x.Model.ParentMenuId).MustAsync(MustBeValidPatent); }); When(x => x.Model.PageId != null, () => { RuleFor(x => x.Model.PageId).MustAsync(MustBeValidPage); }); RuleFor(x => x.Model.Id).MustAsync(ShouldBeValidId); _context = context; _context = context; }
public GetMenuResourceByIdHandler(IMapper mapper, IDotnetAccessControlDbContext context) { _mapper = mapper; _context = context; }
public CheckUserAccessHandler(IDotnetAccessControlDbContext context, IAccessControlIdentityService identityService) { _context = context; _identityService = identityService; }
public ServerSideValidator(IDotnetAccessControlDbContext context) { RuleFor(x => x.Model).SetValidator(new SharedValidators.ClientSideValidator()); RuleFor(x => x.Model.ResourceId).MustAsync(MustBeValidateMenuId); _context = context; }
public AddPageResourceHanlder(IMapper mapper, IDotnetAccessControlDbContext context) { _mapper = mapper; _context = context; }
public UpdateApiResourceHandler(IDotnetAccessControlDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public GetAccessibleResourceByUsernameHandler(IDotnetAccessControlDbContext context, IAccessControlIdentityService identityService) { _context = context; _identityService = identityService; }
public GetElementResourceByIdHanlder(IMapper mapper, IDotnetAccessControlDbContext context) { _mapper = mapper; _context = context; }
public static IServiceCollection AddDotNetAccessControll(this IServiceCollection services, IDotnetAccessControlDbContext context) { //services.AddDbContextPool<DotNetAccessControlDbContext>((serviceProvider, options) => //{ // options.UseSqlServer(currentConnectionString, x => x.EnableRetryOnFailure(3)); // options.UseLoggerFactory(LoggerFactory.Create(c => c.AddConsole())).EnableSensitiveDataLogging(); //}); services.AddScoped <IDotnetAccessControlDbContext>(provider => provider.GetService <DotNetAccessControlDbContext>()); services.AddSingleton <ICurrentUserService, CurrentUserService>(); services.AddTransient <IDateTime, DateTimeService>(); return(services); }
public GetMenuResourceByIdHandler(IDotnetAccessControlDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public UpdateElementHandler(IMapper mapper, IDotnetAccessControlDbContext context) { _mapper = mapper; _context = context; }
public AddElementResourceHandler(IDotnetAccessControlDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public GenericRoleToResourceHandler(IDotnetAccessControlDbContext dbContext, IMapper mapper) { _dbContext = dbContext; _mapper = mapper; }
public GetMenuAndSubMenuByUsernameHandler(IDotnetAccessControlDbContext context, IMediator mediator) { _context = context; _mediator = mediator; }
public GetAllApiResourceHandler(IMapper mapper, IDotnetAccessControlDbContext context) { _mapper = mapper; _context = context; }