Read and write .NET Objects in SQL Database without serialization.
Posted
by
Mohit
on Stack Overflow
See other posts from Stack Overflow
or by Mohit
Published on 2011-01-11T02:47:20Z
Indexed on
2011/01/11
2:54 UTC
Read the original article
Hit count: 172
sql-server
|object
Hello,
I have a small query. I need to create a Caching Service of my own that will write and read .NET Objects to and from the Database. Now, I have achieved that with the help of Binary Serialization. But the Problem is I need to deliberately marked my objects as [Serializable], which makes me think that what if someone will try to add an object which is not marked as [Serializable].
Thus, I need to find a way to read and write Objects to Database without Serialization.
I have one thought too.. As we all know Session can store any object in it. Now, we can make sessions to be stored in the DB, outproc. What mechanism it uses to store these objects without serializing or deserializing.
Any help will be highly appreciated.
Thanks. M.B
© Stack Overflow or respective owner