//Constructor public InMemoryWorkspace(String name, string contextNamespace, string contextTypeName) : base(DataLayerProviderKind.InMemoryLinq, name, contextNamespace, contextTypeName) { this.DataGenerator = new GraphBasedDataGenerator(this, new CodeGeneratingDataInserter(this)); if (AstoriaTestProperties.IsRemoteClient) { BeforeServiceCreation.Add(() => WorkspaceLibrary.AddSilverlightHostFiles(this)); } this.RequiredFrameworkSources.Add("InMemoryContext.cs"); this.RequiredFrameworkSources.Add("InMemoryDataService.cs"); this.RequiredFrameworkSources.Add("InMemoryEntitySetDictionary.cs"); ConstructedFile inMemoryContextFile = new ConstructedFile("InMemoryContext.cs"); ServiceModifications.Files.Add(inMemoryContextFile); ServiceModifications.Interfaces.IUpdatable.ImplementingFile = inMemoryContextFile; ServiceModifications.Interfaces.IDataServiceUpdateProvider.ImplementingFile = inMemoryContextFile; }
//Constructor public LinqToSqlWorkspace(String name, string contextNamespace, string contextTypeName) : base(DataLayerProviderKind.LinqToSql, name, contextNamespace, contextTypeName) { BeforeServiceCreation.Add(() => WorkspaceLibrary.CreateDefaultDatabase(this)); }