Coder Social home page Coder Social logo

ef6c's Introduction

ef6c : cohabitation d'Entity Framework 6 et d'Entity Framework Core par l'exemple

Program.cs illustre comment faire cohabiter des appels à:

  • Entity Framework 6, et
  • Entity Framework Core.

Dans le même fichier.

Il s'agit du cas de cohabitation le plus poussé. Je subodore des problèmes avec des methodes d'extensions qui ne permettraient pas d'utiliser des alias de namespace.

Ce problème est avéré pour les méthode d'extention de IQueryable<TEntity> qui se trouvent dans:

  • System.Data.Entity pour EF6, et
  • Microsoft.EntityFrameworkCore pour EF Core.

Il est donc impossible d'utiliser la methode Include dans un fichier comportant du code EF6 et du code EF Core.

Dans mon cas, le chagerment avide d'une propriété sur un DbSet EF Core avec la methode d'extension EF6:

  • Aucune erreur de compilation
  • Erreur Valeur nulle a l'exécution lors de l'accès à la propriété qui aurait du être avidement chargée.

ef6c : coexistence of Entity Framework 6 and d'Entity Framework Core by example

Program.cs illustrate how to use:

  • Entity Framework 6, et
  • Entity Framework Core.

In the same file.

It is the less peacefull coexistence case. I sense possible matter with extension methods disallowing the use of namespace alias.

Such matter is very real for extension methods of IQueryable<TEntity> which are located in:

  • System.Data.Entity for EF6, and
  • Microsoft.EntityFrameworkCore for EF Core.

It is so impossible to use Include method in a file comprising EF6 code and EF Core code.

In my case, earger loading of a property of an EF Core DbSet results in:

  • No error at compile time
  • Null Value error at runtime when accessing to the no so eagerly loaded property.

ef6c's People

Contributors

tschmit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.