/// <summary>
 /// Get table name
 /// </summary>
 /// <param name="context"></param>
 /// <param name="entityType"></param>
 /// <returns></returns>
 public static string GetTableName(this DbContextBase context, Type entityType)
 {
     return(context.GetEntityType(entityType)?.GetTableName());
 }
 /// <summary>
 /// Get EntityType for given type.
 /// </summary>
 /// <param name="context"></param>
 /// <param name="entityType"></param>
 /// <returns></returns>
 public static IEntityType GetEntityType(this DbContextBase context, Type entityType)
 {
     return(context.Model.FindEntityType(entityType));
 }
 /// <summary>
 /// Get table name
 /// </summary>
 /// <param name="context"></param>
 /// <typeparam name="TEntity"></typeparam>
 /// <returns></returns>
 public static string GetTableName <TEntity>(this DbContextBase context)
     where TEntity : class, IEntity, new()
 {
     return(context.GetEntityType <TEntity>()?.GetTableName());
 }
 /// <summary>
 /// Get EntityType for given type.
 /// </summary>
 /// <param name="context"></param>
 /// <typeparam name="TEntity"></typeparam>
 /// <returns></returns>
 public static IEntityType GetEntityType <TEntity>(this DbContextBase context)
     where TEntity : class, IEntity, new()
 {
     return(context.Model.FindEntityType(typeof(TEntity)));
 }