Is it possible to work directly with Entityframework fonts?

Asked

Viewed 646 times

4

It is possible to work directly with the Entity Framework and power "thresh" within their classes and methods?

I downloaded the zip from his code Codeplex. I unpacked in a folder and in my project I added the project directly:

..\EntityFramework\src\EntityFramework\EntityFramework.csproj

The build does not report any error. But when running my application the following error message is displayed:

Could not load file or Assembly 'Entityframework' or one of its dependencies. Could not verify strong name signature. Perhaps Assembly was breached or signed late, but not fully signed with the correct private key. (Exception of HRESULT: 0x80131045)

Let’s say it’s by didactic, to test further how it handles some tasks.

If it’s possible and this error message is because of something wrong I did or something I stopped doing, what should I do and how to prepare my application to work directly with the sources of Entity Framework?

If it’s possible and you do it commonly, then how can I organize my project in a simpler way to work with it directly through the sources?


EDITION

As @Cigano indicated, I’m trying with sources repository on Github:

https://github.com/aspnet/EntityFramework

However, I am getting several error messages:

Package References not found. Run 'build initialize' before Opening Solution for first time.

What is he asking me to do? How to do?

2 answers

5


Using Nightly Builds

It is also possible to work with the daily version releases made by Micosoft, but which are packaged and I do not know if the Dlls of these packages have Debug information. In any case, I believe it is possible to mix this method with the method below.

Use the following link to take the step by step of setting up EF7 in your application using night packs: https://github.com/aspnet/EntityFramework/wiki/Using-EF7-in-Traditional-.NET-Applications

Script for installing and using the Entity Framework from sources

What I should teach you here is to compile Entity Framework 7, which on the date of this reply is the beta edition provided on Github.

1. Download the sources

In this step I suppose you have at least one Github account and have notions of how to use it.

Using the Github for Windows, clone on your machine the following repository:

https://github.com/aspnet/EntityFramework

2. Initialize your copy

Go to the root of the directory EntityFramework downloaded by your Github, open a command prompt on it (in Windows Explorer, hold Shift and right-click the directory, then choose the option Open Command Window Here, or in Portuguese, Open command prompt here ), and type:

build initialize

Nuget will be invoked and the project dependencies will be installed automatically. The window will look like this:

Entity Framework 1

3. Open and Compile the project

The project opens on Visual Studio 2013 with the Update 2. Open the project, just compile the project EntityFramework.SqlServer:

Compilando o Entity Framework

4. Replace the Packages Dlls

For the test, I added all the compiled files that were inside src/EntityFramework.SqlServer/bin/Debug inside the directory packages/EntityFramework-<versão>/lib/net45. You may need to remove old project references before replacing these files.

  • 2

    Open the Package Manager Console and type build initialize.

  • @Tiagosilva In fact this was the command. I still could not perform the whole procedure. I owe you for an opportunity where I’m more relaxed.

4

The Entity Framework contained in the Github is version 7, while the installed in the applications via Nuget is version 6.1, as tested in VS 2013, is still from Codeplex.

According to information on the EF 7 Wiki, on Github:

  • Data Annotations are not yet supported for Configuring a model.
  • The Fluent API only has very basic Functionality implemented so far. For Many Modelling Concerns (such as Defining relationships between entities) you need to Manipulate the underlying Object model directly.

Atritubos are not yet supported and the Fluent API is in a very basic version.

In my tests, adding reference to projects Entityframework, Entityframework.Sqlserver and Migrate it was already possible to compile and run the project without errors.
I was able to debug by the methods.

Observing: In these tests I did not yet copy the folders of these projects into mine, I added the projects to my solution searching them directly from the folder where I unpacked the sources of Entity Framework.

Since it is for a didactic question and to test more deeply how EF is working with my model, the version contained in Nuget at the moment is more interesting to me.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.