I have a stored procedure that returns data from a multi-table query. To do this do I need to create a DbSet for each of the tables that are involved in the query? All the examples I find that use FromSql have a DbSet (e.g., Books in the below example) specified before the FromSql clause.
using (var context = new SampleContext())
{
var books = context.Books
.FromSql("EXEC GetAllBooks")
.ToList();
}
My understanding is a DbSet represents an table. Note that I am working against an existing DB so am not using EF to generate the tables.
Thanks,