Table of Contents

Class MappingSchemaExtensions

Namespace
LinqToDB.Tools
Assembly
linq2db.Tools.dll
public static class MappingSchemaExtensions
Inheritance
MappingSchemaExtensions

Methods

GetEntityEqualityComparer<T>(IDataContext)

Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.

public static IEqualityComparer<T> GetEntityEqualityComparer<T>(this IDataContext dataContext)

Parameters

dataContext IDataContext

Instance of IDataContext.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

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.

public static IEqualityComparer<T> GetEntityEqualityComparer<T>(this ITable<T> table) where T : notnull

Parameters

table ITable<T>

Instance of ITable<T>.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

T

The type of entity to compare.

GetEntityEqualityComparer<T>(MappingSchema)

Returns implementations of the IEqualityComparer<T> generic interface based on provided entity columns equality.

public static IEqualityComparer<T> GetEntityEqualityComparer<T>(this MappingSchema mappingSchema)

Parameters

mappingSchema MappingSchema

Instance of MappingSchema.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

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.

public static IEqualityComparer<T> GetEqualityComparer<T>(this IDataContext dataContext, Func<ColumnDescriptor, bool> columnPredicate)

Parameters

dataContext IDataContext

Instance of IDataContext.

columnPredicate Func<ColumnDescriptor, bool>

A function to filter columns to compare.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

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.

public static IEqualityComparer<T> GetEqualityComparer<T>(this ITable<T> table, Func<ColumnDescriptor, bool> columnPredicate) where T : notnull

Parameters

table ITable<T>

Instance of ITable<T>.

columnPredicate Func<ColumnDescriptor, bool>

A function to filter columns to compare.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

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.

public static IEqualityComparer<T> GetEqualityComparer<T>(this MappingSchema mappingSchema, Func<ColumnDescriptor, bool> columnPredicate)

Parameters

mappingSchema MappingSchema

Instance of MappingSchema.

columnPredicate Func<ColumnDescriptor, bool>

A function to filter columns to compare.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

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.

public static IEqualityComparer<T> GetKeyEqualityComparer<T>(this IDataContext dataContext)

Parameters

dataContext IDataContext

Instance of IDataContext.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

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.

public static IEqualityComparer<T> GetKeyEqualityComparer<T>(this ITable<T> table) where T : notnull

Parameters

table ITable<T>

Instance of ITable<T>.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

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.

public static IEqualityComparer<T> GetKeyEqualityComparer<T>(this MappingSchema mappingSchema)

Parameters

mappingSchema MappingSchema

Instance of MappingSchema.

Returns

IEqualityComparer<T>

Instance of IEqualityComparer<T>.

Type Parameters

T

The type of entity to compare.