C# Class FluentLinqToSql.Mappings.ColumnMapping

Mapping class that represents a property mapped to a column.
Inheritance: IColumnMapping
Mostrar archivo Open project: JeremySkinner/FluentLinqToSql Class Usage Examples

Public Methods

Method Description
AutoSync ( AutoSync autoSync ) : IColumnMapping

Specifies the AytoSync value for this property. AutoSync instructs the runtime how to retrieve the value after an insert or update operation.

ColumnMapping ( MemberInfo property ) : System.Collections.Generic

Creates a new instance of the ColumnMapping class.

DbGenerated ( ) : IColumnMapping

Marks the column as generated by the database.

DbType ( string dbType ) : IColumnMapping

Specifies the type of the column in the database.

Expression ( string expression ) : IColumnMapping

Specifies the expression that should be used to calculate the column.

Named ( string name ) : IColumnMapping

Specifies the name of the column to which the property should be mapped.

NotNull ( ) : IColumnMapping

Specifies that the column is not nullable.

PrimaryKey ( ) : IColumnMapping

Marks the column as part of the table's Primary Key.

SetAttribute ( string name, string value ) : IColumnMapping

Sets an attribute that will be generated in the XML.

Storage ( string fieldName ) : IColumnMapping

Specifies that Linq to Sql should bypass the public property and use the specified field directly.

ToXml ( ) : IEnumerable

Convers the column mapping to an Column element.

UpdateCheck ( UpdateCheck updateCheck ) : IColumnMapping

Specifies how Linq to Sql approaches the detection of optimistic concurrency conflicts.

The default is 'Always' unless the entity has a version field is defined.

Version ( ) : IColumnMapping

Marks the column as a database timestamp or version number.

Method Details

AutoSync() public method

Specifies the AytoSync value for this property. AutoSync instructs the runtime how to retrieve the value after an insert or update operation.
public AutoSync ( AutoSync autoSync ) : IColumnMapping
autoSync AutoSync The autosync value
return IColumnMapping

ColumnMapping() public method

Creates a new instance of the ColumnMapping class.
public ColumnMapping ( MemberInfo property ) : System.Collections.Generic
property System.Reflection.MemberInfo The property that should be mapped
return System.Collections.Generic

DbGenerated() public method

Marks the column as generated by the database.
public DbGenerated ( ) : IColumnMapping
return IColumnMapping

DbType() public method

Specifies the type of the column in the database.
public DbType ( string dbType ) : IColumnMapping
dbType string Data type for the column
return IColumnMapping

Expression() public method

Specifies the expression that should be used to calculate the column.
public Expression ( string expression ) : IColumnMapping
expression string The expression that should be used to calculate the column
return IColumnMapping

Named() public method

Specifies the name of the column to which the property should be mapped.
public Named ( string name ) : IColumnMapping
name string The name
return IColumnMapping

NotNull() public method

Specifies that the column is not nullable.
public NotNull ( ) : IColumnMapping
return IColumnMapping

PrimaryKey() public method

Marks the column as part of the table's Primary Key.
public PrimaryKey ( ) : IColumnMapping
return IColumnMapping

SetAttribute() public method

Sets an attribute that will be generated in the XML.
public SetAttribute ( string name, string value ) : IColumnMapping
name string Name of attribute
value string value
return IColumnMapping

Storage() public method

Specifies that Linq to Sql should bypass the public property and use the specified field directly.
public Storage ( string fieldName ) : IColumnMapping
fieldName string Name of field that the column should be mapped to
return IColumnMapping

ToXml() public method

Convers the column mapping to an Column element.
public ToXml ( ) : IEnumerable
return IEnumerable

UpdateCheck() public method

Specifies how Linq to Sql approaches the detection of optimistic concurrency conflicts.
The default is 'Always' unless the entity has a version field is defined.
public UpdateCheck ( UpdateCheck updateCheck ) : IColumnMapping
updateCheck UpdateCheck The UpdateCheck value to use
return IColumnMapping

Version() public method

Marks the column as a database timestamp or version number.
public Version ( ) : IColumnMapping
return IColumnMapping