Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hi,please vs entityframe work core #19

Open
introspection3 opened this issue Mar 5, 2019 · 4 comments
Open

hi,please vs entityframe work core #19

introspection3 opened this issue Mar 5, 2019 · 4 comments

Comments

@introspection3
Copy link

hi,please vs entityframe work core

@introspection3
Copy link
Author

and linq2db's advantage

@MaceWindu
Copy link
Contributor

MaceWindu commented Mar 5, 2019

In short.
Pro:

Contra:

  • doesn't have change tracking
  • doesn't have code-first approach support

this could be mitigated using our linq2db with EF.Core integration https://github.com/linq2db/linq2db.EntityFrameworkCore

I think @to11mtm could provide more details later

@to11mtm
Copy link

to11mtm commented Mar 5, 2019

Other Points (May be advantage or disadvantage depending on point of view)

  • Very close representation to what is actually happening at the Database Level. You'd be amazed at how easy it is to take a SQL Query you've written in Sql Server Management Studio or Oracle SQL Developer, and then translate it into a query with Linq2Db.

  • That somewhat ties to my next point; In EF, You typically have to consider 'how' EF works. While some consider EF's change tracking to be a feature, in many cases it is actually a detriment. My favorite example: Updating a single column on one or more entities in a single round trip. In Linq2Db this is simple: db.MyTable.Where(x=>x.ID==4).Set(s=>s.Cost,50).Update(); In EF you typically have to write a lot of tricky code around how the entity is attached and detached. Sure, you can drop to Entity-SQL or Raw SQL, but then what's the point of a Linq Provider? ;) This feature alone was what made me go from Dapper to being a huge proponent of Linq2Db.

  • Linq2Db is Very easy to extend with the [SqlFunction] and [SqlExpression] Attributes: these let you extend your syntax with functions that can be reused inside Linq queries. Some examples of this can be seen here but we will be adding more concise details to our main documentation shortly.

I'll probably add some more thoughts later. :)

@MaceWindu MaceWindu transferred this issue from linq2db/linq2db May 26, 2019
@MaceWindu MaceWindu reopened this May 26, 2019
@MaceWindu
Copy link
Contributor

Worth documenting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants