Esempio n. 1
0
		public void InsertLicenseKey(Model.LicenseKey key)
		{
			long newId;

			//using (ScutexEntities db1 = new ScutexEntities())
			//{
			LicenseKey lk = new LicenseKey();

			Mapper.CreateMap<Model.LicenseKey, LicenseKey>();
			lk = Mapper.Map<Model.LicenseKey, LicenseKey>(key);
			lk.LicenseKey1 = key.Key;
			lk.HashedLicenseKey = key.HashedLicenseKey;

			db.AddToLicenseKeys(lk);
			db.SaveChanges();

			newId = lk.LicenseKeyId;
			//}
		}
Esempio n. 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the LicenseKeys EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLicenseKeys(LicenseKey licenseKey)
 {
     base.AddObject("LicenseKeys", licenseKey);
 }
Esempio n. 3
0
 /// <summary>
 /// Create a new LicenseKey object.
 /// </summary>
 /// <param name="licenseKeyId">Initial value of the LicenseKeyId property.</param>
 /// <param name="licenseSetId">Initial value of the LicenseSetId property.</param>
 /// <param name="licenseKey1">Initial value of the LicenseKey1 property.</param>
 /// <param name="hashedLicenseKey">Initial value of the HashedLicenseKey property.</param>
 /// <param name="createdOn">Initial value of the CreatedOn property.</param>
 public static LicenseKey CreateLicenseKey(global::System.Int64 licenseKeyId, global::System.Int32 licenseSetId, global::System.String licenseKey1, global::System.String hashedLicenseKey, global::System.DateTime createdOn)
 {
     LicenseKey licenseKey = new LicenseKey();
     licenseKey.LicenseKeyId = licenseKeyId;
     licenseKey.LicenseSetId = licenseSetId;
     licenseKey.LicenseKey1 = licenseKey1;
     licenseKey.HashedLicenseKey = hashedLicenseKey;
     licenseKey.CreatedOn = createdOn;
     return licenseKey;
 }