let Default Context be optional

Apr 7, 2009 at 8:23 AM
for some reason, each component of my program will hold its own db, so there is no need of a default context.
but if i don't set default context in app.config, there will be some exceptions thrown out.
my suggestion is let setting default context be optional.

simply add this code seems work:

in EntryConfig.cs

public static DbDriver GetDriver(string Prefix)
            if (Prefix != "") { Prefix += "."; }
            else return null;//add this line
Apr 7, 2009 at 2:22 PM
Default context handles too many stuff of DbEntry so I'd rather to force to have it but not just return null.
And the default context configuration could be fake config like Access without the db file.
And  <add key="DefaultContext" value="something" /> also works for your situation I think.