Table of Contents

Class EntityBaseExtensions

Namespace
MADE.Data.EFCore.Extensions
Assembly
MADE.Data.EFCore.dll

Defines a collection of extensions for the EntityBase type.

public static class EntityBaseExtensions
Inheritance
EntityBaseExtensions
Inherited Members

Methods

ConfigureDateProperties<TEntity>(EntityTypeBuilder<TEntity>)

Configures the created and updated date properties of an TEntity as UTC.

public static EntityTypeBuilder<TEntity> ConfigureDateProperties<TEntity>(this EntityTypeBuilder<TEntity> builder) where TEntity : class, IDatedEntity

Parameters

builder EntityTypeBuilder<TEntity>

The entity type builder associated with the entity.

Returns

EntityTypeBuilder<TEntity>

The entity type builder.

Type Parameters

TEntity

The type of entity to configure.

ConfigureWithKey<TEntity, TKey>(EntityTypeBuilder<TEntity>)

Configures the default properties of an TEntity.

public static EntityTypeBuilder<TEntity> ConfigureWithKey<TEntity, TKey>(this EntityTypeBuilder<TEntity> builder) where TEntity : class, IEntityBase<TKey>

Parameters

builder EntityTypeBuilder<TEntity>

The entity type builder associated with the entity.

Returns

EntityTypeBuilder<TEntity>

The entity type builder.

Type Parameters

TEntity

The type of entity to configure.

TKey

The type of unique identifier for the entity.

Configure<TEntity>(EntityTypeBuilder<TEntity>)

Configures the default properties of an TEntity.

public static EntityTypeBuilder<TEntity> Configure<TEntity>(this EntityTypeBuilder<TEntity> builder) where TEntity : class, IEntityBase

Parameters

builder EntityTypeBuilder<TEntity>

The entity type builder associated with the entity.

Returns

EntityTypeBuilder<TEntity>

The entity type builder.

Type Parameters

TEntity

The type of entity to configure.