I want to query the user that log in success in the web site :
This is what I did in my views :
var query = from i in Model.DataContext.Customers
where i.WebAccount == User.Identity.Name
select i;
But it show the error Object reference not set to an instance of an object, I have no idea , why it is like that. Any one know about that? Thanks.