コード例 #1
0
		public Table AddDenormalizedTable(string schema, string catalog, string name, bool isAbstract, string subselect, Table includedTable)
		{
			string key = subselect ?? dialect.Qualify(schema, catalog, name);

			Table table = new DenormalizedTable(includedTable)
			              	{
												IsAbstract = isAbstract, 
												Name = name, 
												Catalog = catalog, 
												Schema = schema, 
												Subselect = subselect
											};

			Table existing;
			if (tables.TryGetValue(key, out existing))
			{
				if (existing.IsPhysicalTable)
				{
					throw new DuplicateMappingException("table", name);
				}
			}

			tables[key] = table;
			return table;
		}
コード例 #2
0
ファイル: Mappings.cs プロジェクト: ray2006/WCell
		public Table AddDenormalizedTable(string schema, string catalog, string name, bool isAbstract, string subselect, Table includedTable)
		{
			string key = subselect ?? Table.Qualify(schema, catalog, name);
			if (tables.ContainsKey(key))
			{
				throw new DuplicateMappingException("table", name);
			}

			Table table = new DenormalizedTable(includedTable);
			table.IsAbstract = isAbstract;
			table.Name = name;
			table.Schema = schema;
			table.Subselect = subselect;
			tables[key] = table;
			return table;
		}