コード例 #1
0
        public LegacyDbExpressionConverterTests()
        {
            const string ssdl =
                "<Schema Namespace='AdventureWorksModel.Store' Provider='System.Data.SqlClient' ProviderManifestToken='2008' xmlns='http://schemas.microsoft.com/ado/2009/11/edm/ssdl'>"
                +
                "  <EntityContainer Name='AdventureWorksModelStoreContainer'>" +
                "    <EntitySet Name='EntitiesSet' EntityType='AdventureWorksModel.Store.Entities' Schema='dbo' />" +
                "    <EntitySet Name='OtherEntitiesSet' EntityType='AdventureWorksModel.Store.OtherEntities' Schema='dbo' />" +
                "  </EntityContainer>" +
                "  <EntityType Name='Entities'>" +
                "    <Key>" +
                "      <PropertyRef Name='Id' />" +
                "    </Key>" +
                "    <Property Name='Id' Type='int' StoreGeneratedPattern='Identity' Nullable='false' />" +
                "    <Property Name='Name' Type='nvarchar(max)' Nullable='false' />" +
                "  </EntityType>" +
                "  <EntityType Name='OtherEntities'>" +
                "    <Key>" +
                "      <PropertyRef Name='Id' />" +
                "    </Key>" +
                "    <Property Name='Id' Type='int' StoreGeneratedPattern='Identity' Nullable='false' />" +
                "    <Property Name='Name' Type='nvarchar(max)' Nullable='false' />" +
                "  </EntityType>" +
                "</Schema>";

            _storeItemCollection         = Utils.CreateStoreItemCollection(ssdl);
            _legacyStoreItemCollection   = _storeItemCollection.ToLegacyStoreItemCollection();
            _legacyDbExpressionConverter = new LegacyDbExpressionConverter(_legacyStoreItemCollection);
        }
コード例 #2
0
        public LegacyDbExpressionConverterTests()
        {
            const string ssdl =
                "<Schema Namespace='AdventureWorksModel.Store' Provider='System.Data.SqlClient' ProviderManifestToken='2008' xmlns='http://schemas.microsoft.com/ado/2009/11/edm/ssdl'>"
                +
                "  <EntityContainer Name='AdventureWorksModelStoreContainer'>" +
                "    <EntitySet Name='EntitiesSet' EntityType='AdventureWorksModel.Store.Entities' Schema='dbo' />" +
                "    <EntitySet Name='OtherEntitiesSet' EntityType='AdventureWorksModel.Store.OtherEntities' Schema='dbo' />" +
                "  </EntityContainer>" +
                "  <EntityType Name='Entities'>" +
                "    <Key>" +
                "      <PropertyRef Name='Id' />" +
                "    </Key>" +
                "    <Property Name='Id' Type='int' StoreGeneratedPattern='Identity' Nullable='false' />" +
                "    <Property Name='Name' Type='nvarchar(max)' Nullable='false' />" +
                "  </EntityType>" +
                "  <EntityType Name='OtherEntities'>" +
                "    <Key>" +
                "      <PropertyRef Name='Id' />" +
                "    </Key>" +
                "    <Property Name='Id' Type='int' StoreGeneratedPattern='Identity' Nullable='false' />" +
                "    <Property Name='Name' Type='nvarchar(max)' Nullable='false' />" +
                "  </EntityType>" +
                "</Schema>";

            _storeItemCollection = Utils.CreateStoreItemCollection(ssdl);
            _legacyStoreItemCollection = _storeItemCollection.ToLegacyStoreItemCollection();
            _legacyDbExpressionConverter = new LegacyDbExpressionConverter(_legacyStoreItemCollection);
        }