What is the .cs file under MyDataContext.dbml for?

2019-07-03 13:38发布

What is that individual (currently empty) file under MyDataContext.dbml for?

Directory structure:

Mydatacontext.dbml
    MyDataContext.cs
    MyDataContext.dbml.layout
    MyDataContext.designer.cs

1条回答
The star\"
2楼-- · 2019-07-03 14:21

It's normally used for you to add a partial MyDataContext class with custom code that won't be overwritten during code generation. If you edited MyDataContext.designer.cs instead, your hand-written code would be erased.

查看更多
登录 后发表回答