Esempio n. 1
0
        internal override void Initialize(int sessionRunStorageId)
        {
            using (RuntimeEntityModel context = RuntimeEntityModel.CreateInstance())
            {
                RuntimeSessionRun =
                    (from sr in context.RTSessionRunSet
                     where sr.Id == sessionRunStorageId
                     select sr).First();
                Debug.Assert(RuntimeSessionRun != null, "Cannot find session run in DB");
                context.Detach(RuntimeSessionRun);

                RunTimeMigrationSource = context.LoadMigrationSources(SourceId).First();
                Debug.Assert(RuntimeSessionRun != null, "Cannot find migration source in DB");
                context.Detach(RunTimeMigrationSource);
            }
        }