/// <summary>
 /// Dispose unmanaged resources and/or set large fields 
 /// (managed/unmanaged) to null. This method will be called whether 
 /// the <see cref="Disposable.Dispose()"/> method is called by the 
 /// finalizer or your code.
 /// </summary>
 protected override void DisposeExtra()
 {
     _conn = null;
     _cmdList = null;
     _tContext = null;
     _entityConfigs = null;
 }
 /// <summary>
 /// Configure entities.
 /// </summary>
 /// <param name="entityConfigs">Passed entity configuration collection.</param>
 protected override void OnConfiguringEntities(EntityConfigurationCollection entityConfigs)
 {
     entityConfigs.Add(new RoleConfiguration <TRole, TKey, TUserRole>());
     entityConfigs.Add(new UserConfiguration <TUser, TKey, TUserLogin, TUserRole, TUserClaim>());
     entityConfigs.Add(new UserLoginConfiguration <TUserLogin, TKey>());
     entityConfigs.Add(new UserRoleConfiguration <TUserRole, TKey>());
     entityConfigs.Add(new UserClaimConfiguration <TUserClaim, TKey>());
 }
        private void Init(string connectionString, string providerName)
        {
            _entityConfigs = new EntityConfigurationCollection();
            _conn = CreateConnection(providerName);
            _conn.ConnectionString = connectionString;
            _cmdList = new List<IDbCommandContext>();

            OnConfiguringEntities(_entityConfigs);
        }
 /// <summary>
 /// Configure entities.
 /// </summary>
 /// <param name="entityConfigs">Passed entity configuration collection.</param>
 protected virtual void OnConfiguringEntities(EntityConfigurationCollection entityConfigs)
 {
 }