I am trying to creating an optional association between a couple of tables. I have one table called Invoice. The Invoice table has a FK reference to the Customer table through the CustomerId field. The Invoice table also has a not enforced FK reference to the Project able through the ProjectId field.
Is there anyway to set up my Linq-To-Sql classes to have an optional association between the Invoice and the Project table?
I'd like to be able to pick off the Name of Project through this association, if one is available.
Clarification
Is it possible to set this up in the dbml file? I have a partial class that extends the Invoice entity and would like to be able to create a property called ProjectName that wrap Invoice.Project.Name.
Just wondering if this is even possible or if I would have to return the left join value in the query.