Created
January 11, 2013 18:59
-
-
Save blachniet/4513046 to your computer and use it in GitHub Desktop.
The default DbContext generation script only generates one constructor for the DbContext. That constructor takes no arguments, so it is not possible to progromatically create the database connection string. If you add the constructor manually, your changes will be erased the next time the generation script is run. To fix this, add the following …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public <#=code.Excape(container)#>(string connectionString) | |
: base(connectionString) | |
{ | |
<# | |
if (!loader.IsLazyLoadingEnabled(container)) | |
{ | |
#> | |
this.Configuration.LazyLoadingEnabled = false; | |
<# | |
} | |
#> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excape should be Escape