Now and then I need a row that refers to a list of integers.
In some of these cases adding whole table feels like overkill. I never need to address these ints
outside the context of the row.
My C# code just gets simpler when I don't need to worry about the multiple tables that are underneath.
A quick example would be: a list of Enums that only exist on the C# side.
In theory I'm looking for a 'List of integers' field type. Is there anything there?
User
- Id int
- Property1 int
- Property2 int
- ListOfEnumValues list(int) -- or something
At the moment I fallback to adding the a comma separated string, but this takes more bytes then I would like and feels even a bit more "dirty".
An example how I do it right now:
public IEnumerable<int> Numbers
{
get { return _NumbersDb.Split(','); }
set { _NumbersDb = string.Join(',', value); }
}
I'm thinking about writing some kind of C# helper method and use varbinary
.
Any other recommendations?