How to make all entities access:internal instead of public in EDMX?

前端 未结 4 1324
一个人的身影
一个人的身影 2021-01-11 16:53

I\'d like my Entity Framework model to generate entities with internal access modifier, instead of public. I use

4条回答
  •  清酒与你
    2021-01-11 17:07

    Sure, in Model Browser window select > EntityTypes

    Model Browser

    and on your type set in Properties window access modifier. You should also modify in EntityContainer > EntitySets the modifier for set, as if the type is internal, the set should be at least internal too (default public).

    Optinally you can use T4 template, where you can directly modify the access modified being generated.

提交回复
热议问题