Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<appSettings>
<add key="Z_EntityFramework_Extensions_LicenseName" value="[licenseName]"/>
<add key="Z_EntityFramework_Extensions_LicenseKey" value="[licenseKey]"/>
</appSettings>
string licenseName = //... PRO license name
string licenseKey = //... PRO license key
Z.EntityFramework.Extensions.LicenseManager.AddLicense("[LicenseName]", "[LicenseKey]");
// 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