Faithlife / FaithlifeData

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

Add collections of DTOs to parameters #9

Closed ejball closed 3 years ago

ejball commented 5 years ago

Combining #7 and #8...

DbParameters.AddDtos(IEnumerable<object> dtos) could add PropA_0, PropB_0, ..., PropA_1, PropB_1, ...

DbParameters.AddDtos(string name, IEnumerable<object> dtos) could add a prefix, e.g. name_PropA_0, name_PropB_0, ..., name_PropA_1, name_PropB_1, ..., ...

DbParameters.AddDtos(Func<string, int, string> name, IEnumerable<object> dtos) could provide full customization of the parameter name.