Re:Understanding the .NET ecosystem: The evolution of .NET i...
by magicalhippo on Tuesday March 21, 2023 @06:30PM
(#35253608)
Yeah, but from what I saw it doesn't help much with master-detail setups? Like, inserting or updating an order with order lines etc. We rely heavily on those.
Re:Understanding the .NET ecosystem: The evolution of .NET i...
by tester756 on Tuesday March 21, 2023 @06:52PM
(#35253849)
It is pure SQL, so it should, I think?
Re:Understanding the .NET ecosystem: The evolution of .NET i...
by NicoJuicy on Tuesday March 21, 2023 @07:11PM
(#35254097)
Use transactions => fails rollback. No need to correct failures.
Important concepts: .NoTracking and setting the EntityState correctly ( mark as deleted, updated, ... )
Additionally, sometimes it's easier to update things granularly, instead of all at once.
I suppose the annoyance comes from updating in bulk on a POST and trying to map everything?
Re:Understanding the .NET ecosystem: The evolution of .NET i...
by jug on Tuesday March 21, 2023 @07:23PM
(#35254233)
Maybe also check PetaPoco. But at this point you're getting closer and closer to code-first EF Core anyway. :)
Re:Understanding the .NET ecosystem: The evolution of .NET i...
by Zecc on Tuesday March 21, 2023 @09:02PM
(#35255249)
I haven't actually tried either Dapper or PetaPoco, only perused their documentation. But I was sold on LinqToDb after seeing how it supported CTE and seeing our close code to generate updates [1] and joins [2] ended up looking like the actual intended SQL.
[1]: https://linq2db.github.io/#update
[2]: https://linq2db.github.io/articles/sql/Join-Operators.html
Re:Understanding the .NET ecosystem: The evolution of .NET i...
by Zecc on Wednesday March 22, 2023 @03:53AM
(#35258068)
"seeing how close"
Re:Understanding the .NET ecosystem: The evolution of .NET i...
by CharlieDigital on Tuesday March 21, 2023 @07:32PM
(#35254357)
It can. Basically you separate the query response by the parent and child in the row using `SplitOn` and it can materialize it.
Dapper seems to be in the middle and it is pretty popular