Hello
I have a problem assigning a value to an entity that has a reference. I get the intellisense and all but I get a null-reference exception when I try to assign it to the object passed into the function that saves to database.
public ActionResult BookingViewEdit([Bind(Include = "BookingViewID,Enabled,ObjectLimit,RSSenabled")]BookingView bv, int selCustomers)
{
bv.Customers.CustomerID = selCustomers;
_bvs.SaveBookingView(bv);
Whats needed to do to assign the value for CustomerID? the FK-key is in the "BookingView"-table, and if I just hit "bv." there is no CustomerID there.
Thanks in advance
/M