Back to Devexpress

PersistentAttribute.MapTo Property

xpo-devexpress-dot-xpo-dot-persistentattribute.md

latest1.8 KB
Original Source

PersistentAttribute.MapTo Property

Gets the name of the table or column to which to map a class or a property/field.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public string MapTo { get; }
vb
Public ReadOnly Property MapTo As String

Property Value

TypeDescription
String

A String value which specifies the name of the table or column to which to map a class or property/field.

|

Remarks

When storing descendant classes to the table of their parent class (see MapInheritanceAttribute), make sure that properties of different data types are not mapped to the same column.

To map a class to a table in a specific schema, prefix the table name with the schema name. For example: “MySchema.MyTable”. Note that the specified schema name must already exist in the database. Also, some connection providers allow you to specify a common schema name for all classes in the ObjectsOwner field of the connection provider. This field is implemented by SQL Server, SQL Server CE, Oracle, PostgreSQL, and DB2 connection providers.

See Also

PersistentAttribute Class

PersistentAttribute Members

DevExpress.Xpo Namespace