/// <summary> /// Create a new LicenseSetFeature object. /// </summary> /// <param name="licenseSetFeatureId">Initial value of the LicenseSetFeatureId property.</param> /// <param name="licenseSetId">Initial value of the LicenseSetId property.</param> /// <param name="featureId">Initial value of the FeatureId property.</param> public static LicenseSetFeature CreateLicenseSetFeature(global::System.Int32 licenseSetFeatureId, global::System.Int32 licenseSetId, global::System.Int32 featureId) { LicenseSetFeature licenseSetFeature = new LicenseSetFeature(); licenseSetFeature.LicenseSetFeatureId = licenseSetFeatureId; licenseSetFeature.LicenseSetId = licenseSetId; licenseSetFeature.FeatureId = featureId; return licenseSetFeature; }
/// <summary> /// Deprecated Method for adding a new object to the LicenseSetFeatures EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToLicenseSetFeatures(LicenseSetFeature licenseSetFeature) { base.AddObject("LicenseSetFeatures", licenseSetFeature); }
private void CreateLicsenSetFeatures(int licenseSetId, IEnumerable<Model.Feature> features) { //using (ScutexEntities db1 = new ScutexEntities()) //{ foreach (var feat in features) { LicenseSetFeature feature = new LicenseSetFeature(); feature.LicenseSetId = licenseSetId; feature.FeatureId = feat.FeatureId; db.AddToLicenseSetFeatures(feature); } db.SaveChanges(); //} }