【发布时间】:2013-06-18 08:10:23
【问题描述】:
我正在使用实体框架和 Linq to Entitites。
我想知道 Visual Studio 2012 中是否有任何方法可以逐步调试此代码。 在放置断点的那一刻,光标越过它但没有进入。
我更感兴趣的是查看 x.e... 的值...而不是生成的 sql 例如。
注意:我可以使用其他工具或 Visual Studio 插件。
IEnumerable<EventPushNotification> eventToPushCollage = eventsForEvaluation
.GroupJoin(eventCustomRepository.FindAllPushedEvents(),
e => e.Id,
p => p.PushedEventId,
(e, p) => new { e, p })
.Where(x => x.e.DateTimeStart > currentDateTime &&
currentDateTime >= x.e.DateTimeStart.AddMinutes(defaultReminders) && // Data from default reminder for collage event in web.config
x.p.Count() == 0) // Check if the Event has not being already pushed
.Select(y => new EventPushNotification
{
Id = y.e.Id,
EventTitle = y.e.EventTitle,
DateTimeStart = y.e.DateTimeStart,
DateTimeEnd = y.e.DateTimeEnd,
Location = y.e.Location,
Description = y.e.Description,
DeviceToken = y.e.DeviceToken
});
【问题讨论】:
-
您可以右键单击其中一个 lambda,然后选择“断点 -> 插入断点”。这将仅突出显示 lambda。
-
blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/… VS-2015 将支持这一点。 :)
标签: c# linq entity-framework debugging lambda