Entity Framework: Ignore Columns

前端 未结 6 1052
谎友^
谎友^ 2020-11-29 07:11

I have a database that I wish to build an EF model from, however I do not want to include certain columns from the database as the columns concerned are maintained exclusive

6条回答
  •  渐次进展
    2020-11-29 07:52

    Do you not want the column to appear in the model at all?

    Try selecting the column in the Designer view and hitting the delete key.

    Edit

    You could make the setter for the property private. Then your app won't be able to modify the value.

提交回复
热议问题