How to configure ProviderManifestToken for EF Code First

后端 未结 10 1130
-上瘾入骨i
-上瘾入骨i 2020-11-27 05:49

I have a asp.net MVC3 project using EF code-first. For my unit testing I have been using SQL Server CE 4.0 and SQL Server 2008 Express. Both have worked perfectly with EF ge

10条回答
  •  [愿得一人]
    2020-11-27 06:53

    I see some comments about oracle above, so here's the code for "EntityFrameworkDbConfiguration" adjusted for oracle:

    internal sealed class EntityFrameworkDbConfiguration : DbConfiguration
    {
        /// 
        /// Initializes a new instance of the  class.
        /// 
        public EntityFrameworkDbConfiguration()
        {
            this.AddDependencyResolver(Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices.Instance);
        }
    }
    

提交回复
热议问题