我正在开发一个应用程序在asp.net MVC 2.0中,我在调用控制器中的Repository
的功能,但它给了我一个例外Object reference not set to an instance of an object
,它不允许我调试这一行,所以我无法找到问题。这是代码。对象引用未设置为C#中对象的实例
private IIssueRepository _issueRepository;
public double CalculateLoadBar(long userID)
{
int i = 0;
double load = 0;
var issues = _issueRepository.GetAssignedIssues(userID);
}
请告诉我如何找出问题。谢谢
绝对正确 – Billz