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

前端 未结 4 1364
一个人的身影
一个人的身影 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:05

    I've just gone over this myself with the latest version of Entity Framework (6.2.0). On line 314 of the .tt file I found this:

    public string EntityClassOpening(EntityType entity)
    

    On line 319 I just changed it to be a string stating internal. Ran the tool and now all my entities are internal.

提交回复
热议问题