public static PrimaryKeyDictionary <TEntity> GetPrimaryKey <TDbContext, TEntity>(this TEntity entity) where TEntity : class where TDbContext : DbContext, new() { return(PrimaryKey.GetFunc <TDbContext, TEntity>().Invoke(entity)); }
public static PrimaryKeyDictionary <TEntity> GetPrimaryKey <TEntity>(this DbContext context, TEntity entity) where TEntity : class { return(PrimaryKey.GetFunc <TEntity>(context).Invoke(entity)); }
public static PrimaryKeyDictionary <TEntity> GetPrimaryKey <TEntity>(this TEntity entity) where TEntity : class { return(PrimaryKey.GetFunc <TEntity>(typeof(TEntity).GetTypeInfo().Assembly).Invoke(entity)); }