Sql 概要文件实体框架
我有以下示例代码:Sql 概要文件实体框架,sql,entity-framework,Sql,Entity Framework,我有以下示例代码: Context context = new Context(); Repository repository = new Repository(context); Post post = repository.First<Post>(x => x.Id == 1); Model model = new Model { Created = cube.Created, Id = cube.Id, Name = cube
Context context = new Context();
Repository repository = new Repository(context);
Post post = repository.First<Post>(x => x.Id == 1);
Model model = new Model {
Created = cube.Created,
Id = cube.Id,
Name = cube.Name,
Pack = cube.Pack.Id,
Mimes = context.Files.Where(x => x.Id == 1).Select(x => x.Mime).ToList()
};
Context Context=newcontext();
Repository Repository=新存储库(上下文);
Post-Post=repository.First(x=>x.Id==1);
模型=新模型{
Created=cube.Created,
Id=cube.Id,
Name=cube.Name,
Pack=cube.Pack.Id,
Mimes=context.Files.Where(x=>x.Id==1).选择(x=>x.Mime).ToList()
};
我需要找到哪些SQL查询被发送到数据库
如何使用SQL Express和VS 2012评测EF查询
有什么工具可以使用吗?这里有一些选项
((ObjectQuery)query)打印查询来检查查询。ToTraceString()
请参见(我认为这只适用于查询,因此在上述场景中可能不是最好的)我不知道您可以在技术讨论中使用kthxbye,但现在开始。编辑:我喜欢它!从现在开始,我将在任何地方使用它。kthxbye!