This question is locked. New answers and comments are not allowed.
Is there a way have managed one-sided association? Let's take this model for example (adding IsManaged() at the end). I'd like to be able to issue
var vendor =
new
Vendor { Name =
"Vnd"
};
vendor.VendorContacts.Add(
new
VendorContact { ContactType =
"Type"
});
model.Add(vendor);
model.Save();
Sadly when I try to run this I get null exception and I have to save the contact first
var vendor =
new
Vendor { Name =
"Vnd"
};
var contact =
new
VendorContact { ContactType =
"Type"
};
model.Add(contact);
model.Save();
vendor.VendorContacts.Add( contact );
model.Add(vendor);
model.Save();