Had this idea to add dynamic multiparam classes, something like:
public class IaYoSMulti<TField1, TField2>
{
public TField1 Field1 {get;set;}
public TField2 Field2 {get;set;}
}
and
public class IaYoSMulti<TField1, TField2, TField3, etc>
{
public TField1 Field1 {get;set;}
public TField2 Field2 {get;set;}
public TField3 Field3 {get;set;}
etc
}
and a select that switches the WhereIn logic like:
db.GetFieldsWhereIn<TableToSelectFrom, int, string, DateTime>(
table => table.Id, idsToSelectFromList, table => table.Id, table => table.FirstName, table => table.DateOfBirth, etc
);
and extension method would look something like:
public static IaYoSMulti<T1, T2, T3> GetFieldsWhereIn<TargetTable, T1, T2, T3>(this IDbConnection db, params[] Func<TargetTable, obj> fieldsToSelect) {
--- do the select of the columns, add them in order to the IaYoSMulti<> selector
}