Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Code Project Team,




I have a doubt in entity framework Currently I am working in entity framework with ASP.NET Current project Infrastructure is 3 tier architecture.

1. In business logic layer I have create one method for get the records from database.
2. In ASP.NET web project using obj of above class I am calling that method in aspx.cs code behind.In aspx.cs code I am calling this reference using following name spaces

1.using System.Data.Entity;
2.using System.Data.Entity.Infrastructure;


I am adding reference both business logic layer & WEB PROJECT.In localhost system its working fine. while developing the application in live in causes error.I am getting following error.


The type or namespace name 'Infrastructure' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?)


Please suggested me solution for this.





Thanks &Regrads
sandeep miriyala
Posted

Don't add Entity Framework library via "Add reference" dialog (it's old version) You need to add NuGet package "Entity Framework" of latest version.
 
Share this answer
 
You need to add the reference of System.Data.Entity.dll in your project.

--Amit
 
Share this answer
 
I am Already add the System.Data.Entity.dll in both projects but it causes error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900