Last active
January 12, 2017 03:02
-
-
Save JonathanMagnan/d695010082d80e9c5c9fd670f8e2f485 to your computer and use it in GitHub Desktop.
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
<appSettings> | |
<add key="Z_EntityFramework_Extensions_LicenseName" value="[licenseName]"/> | |
<add key="Z_EntityFramework_Extensions_LicenseKey" value="[licenseKey]"/> | |
</appSettings> |
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
string licenseName = //... PRO license name | |
string licenseKey = //... PRO license key | |
Z.EntityFramework.Extensions.LicenseManager.AddLicense("[LicenseName]", "[LicenseKey]"); |
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
// CHECK for default provider (SQL Server) | |
if(!Z.EntityFramework.Extensions.LicenseManager.ValidateLicense()) | |
{ | |
throw new Exception("Invalid License!"); | |
} | |
// CHECK for a specific provider | |
if (!Z.EntityFramework.Extensions.LicenseManager.ValidateLicense(ProviderType.MySql)) | |
{ | |
throw new Exception("Invalid License!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment