There exists a SQL 2005/2008 database which has a table having a calculated column. We are while using calculated column like a discriminator in NHibernate so getting it within the database is showing to be really helpful.

To be able to gain the advantages of faster integration tests, Let me have the ability to run our integration tests against an in-memory database for example SQLite or SQL CE. However I don't believe either of individuals offer the calculated column.

Are there more methods to my problem? I've complete accessibility database and may modify it if there is a better solution available. I have seen this post that indicates utilizing a view rather than a calculated column, is the very best alternative?

Things I did was added the calculated column towards the DataTable when loading the table from SqlCe. I saved the phrase the calculated DataColumn inside a "configuration" table saved within the database. I could do complex information that relied on the "chain" of tables, where each table carried out a simplier purpose of a far more complex function. (The final table within the chain contained the outcomes.) I made use of SqlCe because one table of 5 contained 15 million rows. An excessive amount of data for that in-memory data teams of ADO.Internet. (I'd essential of utilizing local client based information before posting to server.)