views:

1432

answers:

1

Does anyone know if it's possible to not use the navigation properties feature of the entity framework for tables linked with a foreign key?

for example, if my client table has an AddressId, I want that AddressId in my model, I don't want it to have a .Address property. But I have thus far been unable to figure out how to do this.

+4  A: 

Sure, you can do this. It's just that the designer won't help you very much. Delete the navigation property, and add a scalar property for AddressId. It will work, but you'll have to be careful about hitting Update Model in the designer, as it may try to "fix" things for you. It's worth getting used to editing EDMX; it's not that bad.

Craig Stuntz
any further resources about manually editing edmx?
Joel Martinez
What, specifically, are you looking for? All of the early Entity Framework documentation was about editing the XML files manually, because there wasn't a designer at that point. The only thing which has changed since then is the three separate files have been rolled into one EDMX file.
Craig Stuntz