This weeks code snippet is prompted by a StackOverflow question, regarding how to detect if the database that was backing an Entity Framework DbContext was SQL Server Compact.
My proposed check simply uses the "is" operator to determine if the Database.Connection property is compatible with the SqlCeConnection class.
so my check is:
context.Database.Connection is SqlCeConnection
No comments:
Post a Comment