public static void Seed(this BaseProjectDbContext db, IWebHost host) { if (db.AllMigrationsApplied()) { BaseProjectInitializer.Initialize(db); } }
public UserCommandHandler(BaseProjectDbContext context, IMapper mapper, UserManager userManager, ITokenFactory tokenFactory, IJwtFactory jwtFactory) { _context = context; _mapper = mapper; _userManager = userManager; _tokenFactory = tokenFactory; _jwtFactory = jwtFactory; }
/// <summary> /// Constructs a new instance of <see cref="RoleStore"/>. /// </summary> /// <param name="context">The <see cref="IBaseProjectUow"/>.</param> /// <param name="describer">The <see cref="IdentityErrorDescriber"/>.</param> public RoleStore(BaseProjectDbContext context, IdentityErrorDescriber describer = null) { if (context == null) { throw new ArgumentNullException(nameof(context)); } _db = context; ErrorDescriber = describer ?? new IdentityErrorDescriber(); }
public static void SeedHostDb(BaseProjectDbContext context) { context.SuppressAutoSetTenantId = true; // Host seed new InitialHostDbBuilder(context).Create(); // Default tenant seed (in host database). new DefaultTenantBuilder(context).Create(); new TenantRoleAndUserBuilder(context, 1).Create(); }
public static bool AllMigrationsApplied(this BaseProjectDbContext db) { var applied = db.GetService <IHistoryRepository>() .GetAppliedMigrations() .Select(m => m.MigrationId); var total = db.GetService <IMigrationsAssembly>() .Migrations .Select(m => m.Key); return(!total.Except(applied).Any()); }
public GetSeparationByPlantHandler(BaseProjectDbContext db, IMapper mapper, UserManager user) { _context = db; _mapper = mapper; _userMananger = user; }
public DefaultEditionCreator(BaseProjectDbContext context) { _context = context; }
public DefaultLanguagesCreator(BaseProjectDbContext context) { _context = context; }
public GetMunicipioListQueryHandler(BaseProjectDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public UpdateCategoryCommandHandler(BaseProjectDbContext db) { _context = db; }
public CreateCategoryCommandHandler(BaseProjectDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public HostRoleAndUserCreator(BaseProjectDbContext context) { _context = context; }
public GetUserListQueryHandler(BaseProjectDbContext context, IMapper mapper, IHttpContextAccessor httpContextAccesor) { _context = context; _mapper = mapper; _httpContextAccesor = httpContextAccesor; }
public DeleteCreditCardCommandHandler(BaseProjectDbContext db) : base(db) { }
public CreateAdministratorCommandHandler(BaseProjectDbContext db, UserManager userManager, IMapper mapper) { _db = db; _userManager = userManager; _mapper = mapper; }
protected UpdateCommandHandler(BaseProjectDbContext db, IMapper mapper) : base(db, mapper) { }
protected DeleteCommandHandler(BaseProjectDbContext db) : base(db) { }
protected GetByIdQueryHandler(BaseProjectDbContext db, IMapper mapper) : base(db, mapper) { }
public GetCategoryParentListQueryHandler(BaseProjectDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public GetAdministratorDetailQueryHandler(BaseProjectDbContext db, IMapper mapper) : base(db, mapper) { }
public UpdatePlantCommandHandler(BaseProjectDbContext db, UserManager userManager) { _context = db; _userManager = userManager; }
public TenantRoleAndUserBuilder(BaseProjectDbContext context, int tenantId) { _context = context; _tenantId = tenantId; }
public DefaultSettingsCreator(BaseProjectDbContext context) { _context = context; }
public InitialHostDbBuilder(BaseProjectDbContext context) { _context = context; }
public GetSepartionListQueryHandler(BaseProjectDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public DefaultTenantBuilder(BaseProjectDbContext context) { _context = context; }
public GetUserDetailQueryHandler(BaseProjectDbContext db, IMapper mapper, UserManager user) { _context = db; _mapper = mapper; _userMananger = user; }
public DeletePlantCommandHandler(BaseProjectDbContext db) { _context = db; }
public DeleteAdministratorCommandHandler(BaseProjectDbContext db, UserManager userManager) : base(db) { _userManager = userManager; }
public UpdateAdministratorCommandHandler(UserManager userManager, BaseProjectDbContext db, IMapper mapper) : base(db, mapper) { _userManager = userManager; }