如何查询基于ASP.NET的服务器中的SingleResult对象?请帮助下面的代码。如何查询基于ASP.NET的服务器中的SingleResult对象?
public class UserController : TableController<User>
{
...
public Task DeleteUser(string id)
{
SingleResult<User> user = Lookup(id);
// I can drill down into user via the debugger and see the data
// I'm looking for. But I don't know how to translate what I see
// in the debugger to a .Net call.
// This is what I see in the debugger:
// new System.Linq.SystemCore_EnumerableDebugView
// <AlertMeService.DataObjects.User>(result.Queryable).Items[0].GroupNm
// which equals "fooGrp"
// The below call doesn't work
// string GroupNm = user.GroupNm;
// I need GroupNm from the object to send a group notification
PostNotification(user.GroupNm, ...);
return DeleteAsync(id);
}
...
任何帮助,非常感谢。
我只想从查找返回的SingleResult对象中获取user.GroupNm。我不知道如何对它进行类型化。 – Mike
你是否遵循了以下建议来检查这个问题,有没有更新? –
布鲁斯,戴的下面的建议工作。感谢您的跟踪。 -Mike – Mike