With Entity Framework you can easily get data from the database doing something like this:
var allBooks = BookContext.Books;
So this code returns all books from the "Book" table.
But I'm getting a string back that tells me from what "table" I need the data from. So I have something like this:
public void GetData(string entity) // entity = "Book"
{
// Get data using the "entity" string from BookContext
BookContext.FromString(entity); // for exmaple
}
Is there a way to retrieve data from the BookContext using a string?