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










share|improve this question























  • 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














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










share|improve this question























  • 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












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










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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
















  • 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












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






share|improve this answer




















  • 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










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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






























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






share|improve this answer




















  • 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














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






share|improve this answer




















  • 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












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






share|improve this answer













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







share|improve this answer












share|improve this answer



share|improve this answer










answered 12 hours ago









David Browne - Microsoft

12.8k1524




12.8k1524











  • 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
















  • 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















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

















 

draft saved


draft discarded















































 


draft saved


draft discarded














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














































































這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3