EF 6 dependency on System.Data.Entity

.net-4.0 c# entity-framework-6

Question

With EF6, my understanding is that all EF related classes have been moved into EntityFramework.dll. I see following code that is using DbContext class

namespace ConsoleApplication1
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;

    public partial class MyDataModel : DbContext
    {
        public MyDataModel ()
            : base("name=MyDataModel ")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }

This DbContext class is defined in System.Data.Entity but project itself does not have any reference to System.Data.Entity.dll in the references section. Two questions

  1. Does it mean that EF still have a dependency on System.Data.Entity
  2. Why there is no reference to System.Data.Entity.dll in this case
1
2
10/27/2014 8:11:33 PM

Popular Answer

System.Data.Entity is part of EF6. See here

2
10/27/2014 8:17:13 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow