Entity Framework Code First Read Only Key -


In EF 4.1 RC1, I have a simple unit such as category , an asset ID With int Can I make a reading only an asset and still work?

If not, how do you protect PK / FK?

In a way, define your ID property like this:

 < Code> public id id {get; Internal set; }   

... then define your DBCTENTEX class in the same category as the "Category" class. It will have the facility to write to the property, but the classes outside the assembly will not be there.

If you need to define your Dibisitiaksteks in a different assembly, you can see the assembly using the legislation. The interior of your "category" category

Comments