I have the following code:
var sql = System.IO.File.ReadAllText(\"data_tables.sql\");
context.Database.ExecuteSqlCommand(sql);
My data_tables.s
You can use EntityFramework.Extended
to achieve this using the .Future
queries.
// build up queries
var q1 = db.Users
.Where(t => t.EmailAddress == "one@test.com")
.Future();
var q2 = db.Tasks
.Where(t => t.Summary == "Test")
.Future();
// this triggers the loading of all the future queries
var users = q1.ToList();