DapperLib / Dapper.Contrib

Dapper community contributions - additional extensions for Dapper
Other
268 stars 99 forks source link

Usage with EF-related POCOs. Operations fail on navigation properties #166

Closed nikriaz closed 8 months ago

nikriaz commented 8 months ago

When I use Entity Framework, relationships between tables are defined through navigation properties which are references between classes. Such properties normally defined as virtual like this:

public virtual Request Request { get; set; }

Dapper.Contrib fails on any of such properties. I should mark all of them like [Write(false)] then it works. I simply can't believe that I should do this manually over all my POCOs! Virtual properties are commonly recognizable as exception from mapping in many libraries.

Am I missing something?

nikriaz commented 8 months ago

No, I didn't miss anything. I looked close to the source code and it's a bit a joke. I think, community overestimates significance of this library.