terrajobst / nquery-vnext

A Roslyn inspired rewrite of NQuery
MIT License
72 stars 16 forks source link

Can you unseal DataTableDefinition? #34

Closed dallmair closed 3 years ago

dallmair commented 3 years ago

We'd like to use NQuery with System.Data.DataTable instances, but provide individual names instead of relying on DataTable.TableName. For this, it would be great if DataTableDefinition would not be sealed, because then we could simply override the Name property.

Would this be ok for you, or shall we implement an own derivative of TableDefinition?

terrajobst commented 3 years ago

How about just adding a constructor overload that takes a name? Seems simpler than deriving. https://github.com/terrajobst/nquery-vnext/blob/master/src/NQuery.Data/DataTableDefinition.cs

dallmair commented 3 years ago

Oh wow, was so deep down in the current workaround implementation that I didn't see the obvious solution. Thanks for pointing me towards the right direction!

So, PR #35 adds the proposed constructor overload.

terrajobst commented 3 years ago

Completed by #35