public static bool CheckSession() { var DeviceId = new DeviceIdBuilder() .AddMachineName() .AddMacAddress() .AddProcessorId() .AddMotherboardSerialNumber() .ToString(); string licenseCode; using (var db = new BrgyMgmtEntities()) { licenseCode = db.ApplicationSettings.Find(1).ApplicationSettingsValue; } CryptoLicense license = new CryptoLicense(licenseCode, Resources.SessionString); //return license.GetUserDataFieldValue("MachineCode", "#") == DeviceId; return(true); }
public GenericRepository(BrgyMgmtEntities context) { this.context = context; this.dbSet = context.Set <TEntity>(); }