I want to use an ORM with a legacy database, but I don't want to expose some of the underlying data types. For example, some of the columns are nullable doubles or floats and I want my domain model to use non nullable decimals.
It seems to be impossible to have Entity Framework automagically cast between these types, and maybe for good reasons. I also want to be able to use enums and so far I have not found any method that don't look like ugly hacks to make this possible.
My idea is simply to use wrappers, where I have table-like classes mapped to the database but wrap them in "real" domain classes for use in code. My question is simply if you have any thoughts about this approach or if you have any tips. I have no experience in mapping a legacy database to an ORM so any comments or suggestions are appreciated.
Note: I've only looked at Entity Framework so I have no knowledge about the capabilities of other ORMs, such as NHibernate.