Hello In my solution I've' got a class library named 'EntityFrameworkModel' AND here i add ADO.NET ENTITY DATA MODEL. So my .edmx model perfectly created.
In my other project in this solution - which is asp,net project, in my web form here is what I do
1.I add the reference to my class library with the .edmx model
2.I add the
using EntityFramModel
3. I make one really simple function which I call in Page_Load
public void LoadTourists()
{
var db = new excursionEntities();
foreach (var tourist in db.Tourists)
{
lblproba.Text += tourist.Name_kir.ToString();
}
}
And I keep getting the error:
Assembly 'EntityFramModel, Version=1.0.0.0, uses 'EntityFramework, Version=5.0.0.0, which has a higher version than referenced assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' e:\New folder\EntityFramModel\bin\Debug\EntityFramModel.dll Tanya_Marinova_FN_0801262079_reservation_system
Since you use your edmx in your webproject you need to reference the same Entity Framework dll in the web project as you have in your library. Your error suggests, that you use a different version of the entity dll.
For anyone who is still having this issue with Entity Framework:
Go to the specific project in a solution
Under references, delete existing reference to Entity Framework
Right-click on the project and click manage nudget package
Add a matching reference (or latest) to Entity framework
Hope this helps