Debugging 检查fluent接口调用之间的对象值

Debugging 检查fluent接口调用之间的对象值,debugging,visual-studio-debugging,fluent-interface,Debugging,Visual Studio Debugging,Fluent Interface,想象一下,这个调用使用了三个fluent API来创建一个非常简单易读的函数(来自Kendo的IQueryableWhere和OrderBy、AutoMapper项目和to、以及ToDataSourceResult) 对于调试,我有时想检查在调用fluent API之间传递的当前值。例如,我可能想知道我的IQueryable在Project和to完成后,但在ToDataSourceResult获得它之前是什么样子 我正在使用VS2010调试器。现在我发现自己正在编辑调用,以便为每个步骤包含临时变

想象一下,这个调用使用了三个fluent API来创建一个非常简单易读的函数(来自Kendo的IQueryable
Where
OrderBy
、AutoMapper
项目和
to
、以及
ToDataSourceResult

对于调试,我有时想检查在调用fluent API之间传递的当前值。例如,我可能想知道我的
IQueryable
Project
to
完成后,但在
ToDataSourceResult
获得它之前是什么样子

我正在使用VS2010调试器。现在我发现自己正在编辑调用,以便为每个步骤包含临时变量,以便检查它们,如下所示:

Dim where = DataSource.TemplateItems.Where(Function(x) x.TemplateID = id)
Dim ordered = where.OrderBy(Function(x) x.SortOrder)
Dim projected = ordered.Project().To(Of TemplateIdRowViewModel)()
Dim result = projected.ToDataSourceResult(req)
Dim jsonified = Json(result)

Return jsonified

感谢您提供有关Project()的提示。到()!
Dim where = DataSource.TemplateItems.Where(Function(x) x.TemplateID = id)
Dim ordered = where.OrderBy(Function(x) x.SortOrder)
Dim projected = ordered.Project().To(Of TemplateIdRowViewModel)()
Dim result = projected.ToDataSourceResult(req)
Dim jsonified = Json(result)

Return jsonified