Wish: Expose ModelKey and Version Info?

Jan 8, 2011 at 4:48 AM

Would it be possible to expose the ModelKey and Version info for the schema from within the codebase, and also include some functions that return the corresponding values from the database? I'm thinking that could be useful in an app that used nHydrate but had the capability of connecting to different databases. If the info was available you could only give the user database choices which matched the nHydrate schema and version.

I realize this information is embedded in the codebase today, but I think it's stored as private constants in the installer. Grabbing the values from a database (by calling fn_listextendedproperty) wouldn't be too hard, but I can see that the functionality already exists in the installer. It just doesn't seem to be exposed publicly.

BTW, my deductions are based on EFDAL, which is what I'm using in a couple of projects.

Coordinator
Jan 23, 2011 at 11:36 PM

This will be in the next version. In the EFDAL and NHDAL this functionality will be present. In the NHDAL it is on the ConfigurationValues class. There is also a validation function that will verify the generated API against the current database connection. You should run this after you set the connection string, or when your Windows app starts, or in the application start of your web application. Look for this in the next few days. Also thanks for the donation.

Jan 24, 2011 at 1:23 AM

You're welcome!

- Mark

"Too much sanity may be madness! But maddest of all -- to see life as it is and not as it should be."

From: codetools [email removed]
Sent: Sunday, January 23, 2011 4:37 PM
To: Mark A. Olbert
Subject: Re: Wish: Expose ModelKey and Version Info? [nhydrate:240933]

From: codetools

This will be in the next version. In the EFDAL and NHDAL this functionality will be present. In the NHDAL it is on the ConfigurationValues class. There is also a validation function that will verify the generated API against the current database connection. You should run this after you set the connection string, or when your Windows app starts, or in the application start of your web application. Look for this in the next few days. Also thanks for the donation.