views:

22

answers:

0

I have a complicated full-text search stored procedure that i have mapped to return an entity type. It won't allow me navigate the references in the result though:

using (MyEntities kb = new MyEntities())
{

    var results = from customer in kb.SearchCustomers("blabla") select new 
       {
         CustomerName = customer.LastName + ", " + customer.FirstName,
         RegionName = customer.Region.Name
       };

}

This is throwing a null reference exception when referring to the customer.Region any help??