I'd like to create a convention to set the column that are named as "Id" to be primary key, I've been looking at the documentacion and so far I've foud ony to do it manually class by class like: with dommel:
public class ProductMap : DommelEntityMap<TEntity>
{
public ProductMap()
{
Map(p => p.Id).IsKey();
}
}
I'd like something more like:
public ConventionMap()
{
Properties<int>().Where(p=>p.Name.ToLower()=="id").isKey();
}
it could be dommel or dapper extensions or any other, I just this implementation to be fluent.
any advice? thanks!