public RedfernDb() : base("Name=RedfernDbConnection") { // create a mock context this._context = new RedfernContext(); this._context.TenantID = 4; this._context.ClientUserName = "******"; }
public RedfernDb(RedfernContext context) : base(RedfernDb.CreateConnectionString(context)) { this._context = context; this._securityContext = new RedfernSecurityContext(); this.Configuration.LazyLoadingEnabled = true; this.Configuration.ProxyCreationEnabled = true; }
public static string CreateConnectionString(RedfernContext context) { return(new SqlConnectionStringBuilder { DataSource = context.DbServer, InitialCatalog = context.DbName, UserID = context.DbUser, Password = context.DbPassword, PersistSecurityInfo = true, ApplicationName = "Redfern", }.ConnectionString); }
public RedfernRepository(RedfernContext context) { _db = new RedfernDb(context); }
public AppController(RedfernContext context, IUserCache <RedfernUser> cache) { _userManager = new UserManager <RedfernUser>(new UserStore <RedfernUser>(new RedfernSecurityContext())); //cache.Init(); }