Geeks With Blogs

Matthew Brubaker Random musings and the resulting code... September 2008 Entries
Enums and NHibernate: Taking the logic out of the view
Everyone knows the benefits of using enums in code. However, when you use NHibernate to store those enums to a database, all you get are the numeric values those enums represent. I wanted a way to take the logic I was using to make the numeric values in the database into a business value a user could make use of. With this problem in mind, I began looking for a solution. My first thought was to simply override ToString, but a) that can’t be done, and b) even if it could, it wouldn’t allow round tripping ......

Posted On Thursday, September 11, 2008 6:45 AM

Copyright © Matthew Brubaker | Powered by: