How come using System.Data.Entity needs referencing only Entity Framework?
up vote
0
down vote
favorite
I've noticed that by installing the Entity Framework NuGet package, three references are added to the project:
- EntityFramework
- EntityFramework.SqlServer
- System.ComponentModel.DataAnnotations
Then I can use System.Data.Entity
without having it referenced in my project. How is it possible? And how can I implement it in my own works?
By the way, I also looked at source code provided by Microsoft, and made sure that the assembly name is System.Data.Entity
too:
System.Data.Entity.csproj
c# .net entity-framework namespaces
add a comment |
up vote
0
down vote
favorite
I've noticed that by installing the Entity Framework NuGet package, three references are added to the project:
- EntityFramework
- EntityFramework.SqlServer
- System.ComponentModel.DataAnnotations
Then I can use System.Data.Entity
without having it referenced in my project. How is it possible? And how can I implement it in my own works?
By the way, I also looked at source code provided by Microsoft, and made sure that the assembly name is System.Data.Entity
too:
System.Data.Entity.csproj
c# .net entity-framework namespaces
With what goal? What is your problem?
– Aldert
13 hours ago
@Aldert It's not a problem actually, it's a matter of learning how .NET works. And of course I can take advantages of these techniques.
– Mostafa F.
12 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've noticed that by installing the Entity Framework NuGet package, three references are added to the project:
- EntityFramework
- EntityFramework.SqlServer
- System.ComponentModel.DataAnnotations
Then I can use System.Data.Entity
without having it referenced in my project. How is it possible? And how can I implement it in my own works?
By the way, I also looked at source code provided by Microsoft, and made sure that the assembly name is System.Data.Entity
too:
System.Data.Entity.csproj
c# .net entity-framework namespaces
I've noticed that by installing the Entity Framework NuGet package, three references are added to the project:
- EntityFramework
- EntityFramework.SqlServer
- System.ComponentModel.DataAnnotations
Then I can use System.Data.Entity
without having it referenced in my project. How is it possible? And how can I implement it in my own works?
By the way, I also looked at source code provided by Microsoft, and made sure that the assembly name is System.Data.Entity
too:
System.Data.Entity.csproj
c# .net entity-framework namespaces
c# .net entity-framework namespaces
edited 17 hours ago
marc_s
564k12510871240
564k12510871240
asked 18 hours ago
Mostafa F.
546
546
With what goal? What is your problem?
– Aldert
13 hours ago
@Aldert It's not a problem actually, it's a matter of learning how .NET works. And of course I can take advantages of these techniques.
– Mostafa F.
12 hours ago
add a comment |
With what goal? What is your problem?
– Aldert
13 hours ago
@Aldert It's not a problem actually, it's a matter of learning how .NET works. And of course I can take advantages of these techniques.
– Mostafa F.
12 hours ago
With what goal? What is your problem?
– Aldert
13 hours ago
With what goal? What is your problem?
– Aldert
13 hours ago
@Aldert It's not a problem actually, it's a matter of learning how .NET works. And of course I can take advantages of these techniques.
– Mostafa F.
12 hours ago
@Aldert It's not a problem actually, it's a matter of learning how .NET works. And of course I can take advantages of these techniques.
– Mostafa F.
12 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I can use System.Data.Entity without having it referenced in my project. How is it possible?
System.Data.Entity is a namespace.
EntityFramework.dll contains many types that belong to the System.Data.Entity namespace. EG DbContext.
DbContext Class
Namespace: System.Data.Entity
Assembly: EntityFramework (in
EntityFramework.dll)
There is an assembly called System.Data.Entity.dll in the .NET Framework, but EF no longer uses it. EF originally was part of the .NET Framework itself, but is now is shipped through NuGet. The old support for older versions of EF is still part of the .NET Framework, as older applications, using older EF still need it. See:
In previous versions of EF the code was split between core libraries
(primarily System.Data.Entity.dll) shipped as part of the .NET
Framework and out-of-band (OOB) libraries (primarily
EntityFramework.dll) shipped in a NuGet package. EF6 takes the code
from the core libraries and incorporates it into the OOB libraries.
This was necessary in order to allow EF to be made open source and for
it to be able to evolve at a different pace from .NET Framework. The
consequence of this is that applications will need to be rebuilt
against the moved types.
Upgrading to Entity Framework 6
Aha, soSystem.Data.Entity
is a namespace withinEntityFramework
assembly (in EF 6)! Thanks a lot. It really helped.
– Mostafa F.
11 hours ago
Namespaces and assemblies are not many-to-many. An assembly can contain classes in multiple namespaces, and a Namespace can have classes across multiple assemblies.
– David Browne - Microsoft
9 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I can use System.Data.Entity without having it referenced in my project. How is it possible?
System.Data.Entity is a namespace.
EntityFramework.dll contains many types that belong to the System.Data.Entity namespace. EG DbContext.
DbContext Class
Namespace: System.Data.Entity
Assembly: EntityFramework (in
EntityFramework.dll)
There is an assembly called System.Data.Entity.dll in the .NET Framework, but EF no longer uses it. EF originally was part of the .NET Framework itself, but is now is shipped through NuGet. The old support for older versions of EF is still part of the .NET Framework, as older applications, using older EF still need it. See:
In previous versions of EF the code was split between core libraries
(primarily System.Data.Entity.dll) shipped as part of the .NET
Framework and out-of-band (OOB) libraries (primarily
EntityFramework.dll) shipped in a NuGet package. EF6 takes the code
from the core libraries and incorporates it into the OOB libraries.
This was necessary in order to allow EF to be made open source and for
it to be able to evolve at a different pace from .NET Framework. The
consequence of this is that applications will need to be rebuilt
against the moved types.
Upgrading to Entity Framework 6
Aha, soSystem.Data.Entity
is a namespace withinEntityFramework
assembly (in EF 6)! Thanks a lot. It really helped.
– Mostafa F.
11 hours ago
Namespaces and assemblies are not many-to-many. An assembly can contain classes in multiple namespaces, and a Namespace can have classes across multiple assemblies.
– David Browne - Microsoft
9 hours ago
add a comment |
up vote
1
down vote
accepted
I can use System.Data.Entity without having it referenced in my project. How is it possible?
System.Data.Entity is a namespace.
EntityFramework.dll contains many types that belong to the System.Data.Entity namespace. EG DbContext.
DbContext Class
Namespace: System.Data.Entity
Assembly: EntityFramework (in
EntityFramework.dll)
There is an assembly called System.Data.Entity.dll in the .NET Framework, but EF no longer uses it. EF originally was part of the .NET Framework itself, but is now is shipped through NuGet. The old support for older versions of EF is still part of the .NET Framework, as older applications, using older EF still need it. See:
In previous versions of EF the code was split between core libraries
(primarily System.Data.Entity.dll) shipped as part of the .NET
Framework and out-of-band (OOB) libraries (primarily
EntityFramework.dll) shipped in a NuGet package. EF6 takes the code
from the core libraries and incorporates it into the OOB libraries.
This was necessary in order to allow EF to be made open source and for
it to be able to evolve at a different pace from .NET Framework. The
consequence of this is that applications will need to be rebuilt
against the moved types.
Upgrading to Entity Framework 6
Aha, soSystem.Data.Entity
is a namespace withinEntityFramework
assembly (in EF 6)! Thanks a lot. It really helped.
– Mostafa F.
11 hours ago
Namespaces and assemblies are not many-to-many. An assembly can contain classes in multiple namespaces, and a Namespace can have classes across multiple assemblies.
– David Browne - Microsoft
9 hours ago
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I can use System.Data.Entity without having it referenced in my project. How is it possible?
System.Data.Entity is a namespace.
EntityFramework.dll contains many types that belong to the System.Data.Entity namespace. EG DbContext.
DbContext Class
Namespace: System.Data.Entity
Assembly: EntityFramework (in
EntityFramework.dll)
There is an assembly called System.Data.Entity.dll in the .NET Framework, but EF no longer uses it. EF originally was part of the .NET Framework itself, but is now is shipped through NuGet. The old support for older versions of EF is still part of the .NET Framework, as older applications, using older EF still need it. See:
In previous versions of EF the code was split between core libraries
(primarily System.Data.Entity.dll) shipped as part of the .NET
Framework and out-of-band (OOB) libraries (primarily
EntityFramework.dll) shipped in a NuGet package. EF6 takes the code
from the core libraries and incorporates it into the OOB libraries.
This was necessary in order to allow EF to be made open source and for
it to be able to evolve at a different pace from .NET Framework. The
consequence of this is that applications will need to be rebuilt
against the moved types.
Upgrading to Entity Framework 6
I can use System.Data.Entity without having it referenced in my project. How is it possible?
System.Data.Entity is a namespace.
EntityFramework.dll contains many types that belong to the System.Data.Entity namespace. EG DbContext.
DbContext Class
Namespace: System.Data.Entity
Assembly: EntityFramework (in
EntityFramework.dll)
There is an assembly called System.Data.Entity.dll in the .NET Framework, but EF no longer uses it. EF originally was part of the .NET Framework itself, but is now is shipped through NuGet. The old support for older versions of EF is still part of the .NET Framework, as older applications, using older EF still need it. See:
In previous versions of EF the code was split between core libraries
(primarily System.Data.Entity.dll) shipped as part of the .NET
Framework and out-of-band (OOB) libraries (primarily
EntityFramework.dll) shipped in a NuGet package. EF6 takes the code
from the core libraries and incorporates it into the OOB libraries.
This was necessary in order to allow EF to be made open source and for
it to be able to evolve at a different pace from .NET Framework. The
consequence of this is that applications will need to be rebuilt
against the moved types.
Upgrading to Entity Framework 6
answered 12 hours ago
David Browne - Microsoft
12.8k1524
12.8k1524
Aha, soSystem.Data.Entity
is a namespace withinEntityFramework
assembly (in EF 6)! Thanks a lot. It really helped.
– Mostafa F.
11 hours ago
Namespaces and assemblies are not many-to-many. An assembly can contain classes in multiple namespaces, and a Namespace can have classes across multiple assemblies.
– David Browne - Microsoft
9 hours ago
add a comment |
Aha, soSystem.Data.Entity
is a namespace withinEntityFramework
assembly (in EF 6)! Thanks a lot. It really helped.
– Mostafa F.
11 hours ago
Namespaces and assemblies are not many-to-many. An assembly can contain classes in multiple namespaces, and a Namespace can have classes across multiple assemblies.
– David Browne - Microsoft
9 hours ago
Aha, so
System.Data.Entity
is a namespace within EntityFramework
assembly (in EF 6)! Thanks a lot. It really helped.– Mostafa F.
11 hours ago
Aha, so
System.Data.Entity
is a namespace within EntityFramework
assembly (in EF 6)! Thanks a lot. It really helped.– Mostafa F.
11 hours ago
Namespaces and assemblies are not many-to-many. An assembly can contain classes in multiple namespaces, and a Namespace can have classes across multiple assemblies.
– David Browne - Microsoft
9 hours ago
Namespaces and assemblies are not many-to-many. An assembly can contain classes in multiple namespaces, and a Namespace can have classes across multiple assemblies.
– David Browne - Microsoft
9 hours ago
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237168%2fhow-come-using-system-data-entity-needs-referencing-only-entity-framework%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
With what goal? What is your problem?
– Aldert
13 hours ago
@Aldert It's not a problem actually, it's a matter of learning how .NET works. And of course I can take advantages of these techniques.
– Mostafa F.
12 hours ago