Home
Options

StaticDataContext app settings

Using Linqpad 5 the app.config file to be loaded in a static data context can be specifed. This can still be specified using Linqpad 6 but doesn't seem to be able to be accessed anywhere.

It looks like the default is that the custom type is instantiated using its default constructor and there doesn't seem to be be anywhere to intercept or to override this.

If I have a type that requires, say, a connection string passedinto the constructor then how would I code it? If there is somewhere that I can instantiate the custom type then I could use the connection string from teh Context or read the config file to get the necessary settings and then call an appropriate constructor on the type.

Comments

Sign In or Register to comment.