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

筅森魡賤 提交于 2019-12-10 18:32:36

问题


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

Directory structure:

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

回答1:


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.



来源:https://stackoverflow.com/questions/936828/what-is-the-cs-file-under-mydatacontext-dbml-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!