Faithlife / FaithlifeData

Helpers for querying ADO.NET-compatible databases.
https://faithlife.github.io/FaithlifeData/
MIT License
6 stars 4 forks source link

Support Sql.DtoParamNames(Where) #48

Closed ejball closed 2 years ago

ejball commented 2 years ago

This is similar to Sql.ColumnNames(Where), but generates parameter names for the specified type of DTO, for use with DtoParameters.AddDto, etc.

So Sql.DtoParamNames<WidgetRecord>() generates @WidgetId, @Name, @Weight, i.e. one parameter name for each property.

ejball commented 2 years ago

Perhaps there should also be DtoParameters.AddDtoWhere and DtoParameters.FromDtoWhere?