I have a class in C# which is used to store data (like a struct). It has subclasses as members, which have other subclasses, etc. Each of them contains data (various Strings, ints, floats, etc.)
Is there a way to store one such C# object in a database, in a single column? What type of column would that be and how can I use it?
The only thing I can think of is to convert my struct to a byte sequence using an algorithm and to store it in a field of binary type.
I would then use a decoding algorithm to get it back and make it an object again.
Even so, is there such an algorithm in C# ready to use?