Insert new object with existing object
问题 I am new to EF 4 and this is what I have done so far: Create an edmx file based on my database Create a code generation for my objects (POCO). Now I have a model1.tt, when expanded I see al my classes Create a repository for each class, based on IRepository Now, I am working with two objects, A and B. Object A has a property of type B. In my winform I have a combo filled with objects of type B. When the save button is pressed, a new instance of class A is created and all the properties are