I have a static constructor that never gets called - in fact CheckedIn is always set to true somehow the code below is from my class library
public partial class Commerce : DbContext
{
...
static Commerce()
{
CheckedIn = false;
IsUpToDate = false;
CheckSchema();
}
public static bool CheckSchema(Action<string,Exception> logMethod = null, bool force = false)
{
if (CheckedIn)
return IsUpToDate;
CheckedIn = true;
...
}
the code below is a vb.net code behind page invoking the CheckSchema() method on the class above. When it calls, the constructor is never called:
If (Commerce.Database.Model.Commerce.CheckSchema()) Then
Return True
End If