News for hackers. Stuff that matters.
Re:Understanding the .NET ecosystem: The evolution of .NET i... by tester756 on Tuesday March 21, 2023 @06:20PM (#35253479)
>It's like either assembly or Python, but nothing in the middle.

Dapper seems to be in the middle and it is pretty popular

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. :)

https://github.com/CollaboratingPlatypus/PetaPoco

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.
Re:Understanding the .NET ecosystem: The evolution of .NET i... by bigtex on Wednesday March 22, 2023 @11:29AM (#35262558)
I use the ORM with Servicestack, OrmLite, and it seems to handle those 1 to many references well.

https://docs.servicestack.net/ormlite/