Class MappingSchemaExtensions
Namespace: LinqToDB.Tools
Assembly: linq2db.Tools.dll
Syntax
public static class MappingSchemaExtensions
Methods
| Improve this Doc View SourceGetEntityEqualityComparer<T>(IDataContext)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.
Declaration
public static IEqualityComparer<T> GetEntityEqualityComparer<T>(this IDataContext dataContext)
Parameters
Type | Name | Description |
---|---|---|
IDataContext | dataContext | Instance of IDataContext. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetEntityEqualityComparer<T>(ITable<T>)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.
Declaration
public static IEqualityComparer<T> GetEntityEqualityComparer<T>(this ITable<T> table) where T : notnull
Parameters
Type | Name | Description |
---|---|---|
ITable<T> | table | Instance of ITable<T>. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetEntityEqualityComparer<T>(MappingSchema)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.
Declaration
public static IEqualityComparer<T> GetEntityEqualityComparer<T>(this MappingSchema mappingSchema)
Parameters
Type | Name | Description |
---|---|---|
MappingSchema | mappingSchema | Instance of MappingSchema. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetEqualityComparer<T>(IDataContext, Func<ColumnDescriptor, bool>)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.
Declaration
public static IEqualityComparer<T> GetEqualityComparer<T>(this IDataContext dataContext, Func<ColumnDescriptor, bool> columnPredicate)
Parameters
Type | Name | Description |
---|---|---|
IDataContext | dataContext | Instance of IDataContext. |
Func<ColumnDescriptor, bool> | columnPredicate | A function to filter columns to compare. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetEqualityComparer<T>(ITable<T>, Func<ColumnDescriptor, bool>)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.
Declaration
public static IEqualityComparer<T> GetEqualityComparer<T>(this ITable<T> table, Func<ColumnDescriptor, bool> columnPredicate) where T : notnull
Parameters
Type | Name | Description |
---|---|---|
ITable<T> | table | Instance of ITable<T>. |
Func<ColumnDescriptor, bool> | columnPredicate | A function to filter columns to compare. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetEqualityComparer<T>(MappingSchema, Func<ColumnDescriptor, bool>)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.
Declaration
public static IEqualityComparer<T> GetEqualityComparer<T>(this MappingSchema mappingSchema, Func<ColumnDescriptor, bool> columnPredicate)
Parameters
Type | Name | Description |
---|---|---|
MappingSchema | mappingSchema | Instance of MappingSchema. |
Func<ColumnDescriptor, bool> | columnPredicate | A function to filter columns to compare. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetKeyEqualityComparer<T>(IDataContext)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity primary key columns equality.
Declaration
public static IEqualityComparer<T> GetKeyEqualityComparer<T>(this IDataContext dataContext)
Parameters
Type | Name | Description |
---|---|---|
IDataContext | dataContext | Instance of IDataContext. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetKeyEqualityComparer<T>(ITable<T>)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity primary key columns equality.
Declaration
public static IEqualityComparer<T> GetKeyEqualityComparer<T>(this ITable<T> table) where T : notnull
Parameters
Type | Name | Description |
---|---|---|
ITable<T> | table | Instance of ITable<T>. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |
GetKeyEqualityComparer<T>(MappingSchema)
Returns implementations of the IEqualityComparer<T> generic interface based on provided entity primary key columns equality.
Declaration
public static IEqualityComparer<T> GetKeyEqualityComparer<T>(this MappingSchema mappingSchema)
Parameters
Type | Name | Description |
---|---|---|
MappingSchema | mappingSchema | Instance of MappingSchema. |
Returns
Type | Description |
---|---|
IEqualityComparer<T> | Instance of IEqualityComparer<T>. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to compare. |