在EF 4和EF 3.5 SP1中,我们可以使用ToTraceString()方法得到EF查询所生成的SQL。
using (var context = new TestDBEntities())
{
var query = from p in context.Parents
where p.Name ...
使用DbContextSeed初始化数据库
添加链接字符串
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection s...