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
builderEntityTypeBuilder<TEntity>The entity type builder associated with the entity.
Returns
- EntityTypeBuilder<TEntity>
The entity type builder.
Type Parameters
TEntityThe 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
builderEntityTypeBuilder<TEntity>The entity type builder associated with the entity.
Returns
- EntityTypeBuilder<TEntity>
The entity type builder.
Type Parameters
TEntityThe type of entity to configure.
TKeyThe 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
builderEntityTypeBuilder<TEntity>The entity type builder associated with the entity.
Returns
- EntityTypeBuilder<TEntity>
The entity type builder.
Type Parameters
TEntityThe type of entity to configure.