henkmollema / Dommel

CRUD operations with Dapper made simple.
MIT License
634 stars 100 forks source link

Insert doesn't work with properties with `private set` #194

Closed matt-lethargic closed 4 years ago

matt-lethargic commented 4 years ago

I've been loving using Dommel for the last week, but now have come across an annoying issue.

My entities all have their properties set to private set, I don't want developers to be able to just change properties I want them to call functions on the entity so that any business logic can happen in a DDD manor.

When I try and use InsertAsync Dommel doesn't build any of the fields into the SQL.

Having private set properties is a perfectly valid scenario in C#, is there any way that this could be looked at so I don't have to use something like EF Core :-/

henkmollema commented 4 years ago

This is fixed with #199.