'Create Database table through code using EF Core in .NET 6

I'm creating a screen for the user to enter his table name and add whatever he wants on that table dynamically, so is that possible in EF Core?

I did some search and what I found is:
We can use something like ExecuteSqlRaw to insert a normal CREATE TABLE SQL query, BUT my concerns are:

1- How could I reflect the created table on my backend (add a new class) and that created table will be created on the production?

2- I will not be able to retrieve or use EF Core or LINQ APIs because I don't have any Entity which will represent that table on the Back-end(C# entity class).

3- If the table has been created dynamically (through code) there will be a gap in the migration file.

I found some related answers but I don't think those answers are answering my questions

answer 1
answer 2
answer 3

to make it more clear I wanna add this API and it will be hit by the client

public void createCustomObject(string tableName,Tuple<T,T> tableParameters ){
:
:
:
my code here (such as CreateCommand) or if there is something better
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source