Exemplo n.º 1
0
        /// <summary>
        /// 附加EF配置
        /// </summary>
        public override void AttatchEFConfig()
        {
            string providerInvariantName = typeof(SqlConnection).Namespace;

            EFDbConfiguration.AddProviderServices(providerInvariantName, SqlProviderServices.Instance);
            EFDbConfiguration.AddProviderFactory(providerInvariantName, SqlClientFactory.Instance);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 附加EF配置
        /// </summary>
        public override void AttatchEFConfig()
        {
            string             providerInvariantName = typeof(SQLiteFactory).Namespace;
            DbProviderServices service = SQLiteProviderFactory.Instance.GetService(typeof(DbProviderServices)) as DbProviderServices;

            EFDbConfiguration.AddProviderServices(providerInvariantName, service);
            EFDbConfiguration.AddProviderFactory(providerInvariantName, SQLiteFactory.Instance);

            providerInvariantName = typeof(SQLiteProviderFactory).Namespace;
            EFDbConfiguration.AddProviderFactory(providerInvariantName, SQLiteProviderFactory.Instance);
        }