xSQL Schema Compare SDK for SQL Server version 12
EntityMapping Class

Provides mapping semantic for database entities.
Object Model
EntityMapping Class
Public NotInheritable Class EntityMapping 
   Implements xSQL.Schema.Core.IKeyedEntity(Of SqlEntityTypeEnum) 
public sealed class EntityMapping : xSQL.Schema.Core.IKeyedEntity<SqlEntityTypeEnum>  
public __gc __sealed class EntityMapping : public xSQL.Schema.Core.IKeyedEntity<SqlEntityTypeEnum>  

Before comparing the schema, database entities are mapped together via the method SqlSchemaCompare.PairObjects(). The default mapping is based on schema and name. There are cases when the default mapping might not be sufficient. Consider, for example, a table named Employees that belongs to HumanResources schema in the left database and dbo schema in the right database. To map this table, either the schema must be ignored or the HumanResources in the left database should be mapped to dbo schema in the right database. This can be achieved by customizing the entity mapping.

xSQL Schema Compare provides there are three types of mappings: Mapping by schema and name: This is the default mapping by schema and name.Mapping by name: Database entities are mapped by name. The schema portion is ignored.Custom mapping: Database entities are mapped by implementing the xSQL.Schema.SqlServer.IEntityMapping interface.

A mapping type is defined for a class of objects, such tables or views. If mapping type is set to EntityMappingTypeEnum.Custom, a IEntityMapping interface that contains the mapping logic is required.

Inheritance Hierarchy



Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also


EntityMapping Members
xSQL.SchemaCompare.SqlServer Namespace



┬ęCopyright 2022 xSQL Software. All Rights Reserved.

Send Feedback