henkmollema / Dommel

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

Multiple Mapping with predicate expression doubt #248

Closed korxaq closed 2 years ago

korxaq commented 3 years ago

Hello!

We were trying to do a select using a predicate expression, but the results should have a include with an entity that has a foreign key relation, kinda like:

var products = con.Select<Product, Category, Product>(p => p.Name.Contains("bike"));

so I can have all the products that have bike in the name with the category on each

Is this possible?

Thanks for the amazing component and for the help!

henkmollema commented 3 years ago

It's not possible yet. Perhaps automatic multi-mapping can be combined with the Select method.

henkmollema commented 2 years ago

This has been implemented a while ago.