Giter VIP home page Giter VIP logo

Comments (2)

gnaeus avatar gnaeus commented on June 15, 2024

Hm... Now we have two different packages: EntityFrameworkCore.CommonTools for EF Core and EntityFramework.CommonTools for EF6. If I split them by functionality, I would get 12 separate packages:

  • EntityFramework.CommonTools.Core
  • EntityFramework.CommonTools.Auditing
  • EntityFramework.CommonTools.Concurrency
  • EntityFramework.CommonTools.Json
  • EntityFramework.CommonTools.TransactionLog
  • EntityFramework.CommonTools.Specification
  • and 6 EntityFrameworkCore.CommonTools.* packages

This is very hard to maintain. And also it would not solve your problem:
EntityFramework.CommonTools.Specification should depends on EntityFramework.CommonTools.Core which depends on EntityFramework.

But I can extract a single package which not depends on EntityFramework. It would contain:

  • IQueryable Extensions
  • JSON Complex Types
  • Specification Pattern

The only caveat is that with such package we could not use EF-dependent IQueryable extensions like .ToListAsync():

IQueryable<User> usersQuery = ...;

var spec = new FriendSpecification();

IQueryable<User> friendsQuery =  usersQuery 
    .AsVisitable(new SpecificationExpander())
    .Where(u => u.Firends.Any(spec.ToExpression()));

friendsQuery.ToList(); // Ok
friendsQuery.ToListAsync(); // should throw Exception

from entityframework.commontools.

nflash avatar nflash commented on June 15, 2024

Didn't realize that Specification would depend on Core and EF.
Also didn't think about giving support to both EF 6 and EF Core that is much more relevant than extracting Specification (I was just thinking about my problem :s ).
I now understand your decision of packing everything in the same packages.
It would be nice to have your Specification implementation in a standalone package, but I now understand that the advantages of this implementation come from the integration with EF.
I will still use this implementation whenever I will also need EF.
Thanks

from entityframework.commontools.

Related Issues (7)

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.