Brady Moritz
Brady Moritz

Reputation: 8899

EF entity designer - ignore column

I'd like to add an "ignored" column to an entity in the EF entity designer. This is a "DB First" model. I've seen in the EF code first stuf that you can add an annotation "NotMapped" to a property and have it be ignored when mapping to a database, is there any way to accomplish this with the enetity designer version as well?

Upvotes: 0

Views: 272

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364399

No. Entity designer is only for mapped columns. If you need to add non mapped property you must add it in code. EF class generation creates partial classes for all entities and complex types defined in the designer. If you need to add non mapped property create your own partial part of entity class and add all your custom properties and methods to that partial part.

Upvotes: 1

Related Questions