Files
xDataService/Interfaces/IXEntityRegisterar.cs
T

36 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using xModels.Base;
namespace xDataService.Interfaces
{
/// <summary>
/// an Interface to Intruduce Entities for Dynamic Registration ...
/// </summary>
public interface IXEntityRegisterar
{
/// <summary>
/// Database Name ...
/// </summary>
string Name { get; }
/// <summary>
/// Returns all entity types this plugin wants registered in the DbContext
/// </summary>
IEnumerable<Type> GetEntityTypes();
/// <summary>
/// Optional: Apply additional per-entity configuration
/// </summary>
void ConfigureEntities(ModelBuilder modelBuilder);
/// <summary>
/// Add XDataService Based Entity to List ...
/// </summary>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
void AddEntity<TEntity, TKey>()
where TEntity : XBaseEntity<TKey>;
}
}