private List <Snapshot_RecsConfiguration> CastToRecsConfigurationsSnapshot(
            List <RecsConfiguration> recsConfigurations, int productHeaderId, int licenseProductId)
        {
            var snapshotList = new List <Snapshot_RecsConfiguration>();

            if (recsConfigurations != null)
            {
                foreach (var config in recsConfigurations)
                {
                    var snapshot = new Snapshot_RecsConfiguration();
                    snapshot.CloneRecsConfigurationId = (int)config.configuration_id;

                    snapshot.LicenseProductId = licenseProductId;

                    snapshot.ConfigurationId = (int)config.Configuration.ConfigId;
                    snapshot.Configuration   = CastToConfigurationSnapshot(config.Configuration);
                    snapshot.ProductHeaderId = productHeaderId;
                    snapshot.Name            = config.name;
                    snapshot.UPC             = config.UPC;
                    snapshot.ReleaseDate     = config.ReleaseDate;
                    snapshot.DatabaseVersion = config.DatabaseVersion;
                    if (config.LicenseProductConfiguration != null)
                    {
                        snapshot.LicenseProductConfigurationId =
                            config.LicenseProductConfiguration.LicenseProductConfigurationId;
                    }
                    //snapshot.LicenseProductConfiguration = config.LicenseProductConfiguration;  temp off
                    snapshotList.Add(snapshot);
                }
            }
            return(snapshotList);
        }
 public Snapshot_RecsConfiguration SaveSnapshotRecsConfiguration(
     Snapshot_RecsConfiguration snapshotRecsConfiguration)
 {
     using (var context = new DataContext())
     {
         context.Snapshot_RecsConfigurations.Add(snapshotRecsConfiguration);
         context.SaveChanges();
         return(snapshotRecsConfiguration);
     }
 }