I am new to ASP.Net and am building an MVC project in VS2013 I have the following actionResult
public ActionResult Index()
{
LaundryUsers db = new LaundryUsers();
var users = db.Laundries.Where(u => u.UserId == WebSecurity.CurrentUserId);
if (users == null)
{
return HttpNotFound();
}
return View(users);
}
The result always throws a null exception but The data is in the table. When I do a break the userid is in the currentUserId. I am from a visual basic background on Desktop
apps. Thanks in advance