仅生成Edmger工具的实体框架模型的对象套件
-
01-10-2019 - |
题
如何仅生成 objectlayer 经过 Edmger工具, ,无生成 CSDL,SSDL和视图 ?
“%windir% microsoft.net framework v4.0.30319 edmgen.exe” /mode:fullgeneration /c:“ data source =。 sqlexpress; jirtis catalog = uqs; intemated catalog = uqs; intectated security = sspi = sspi = sspi“ :uqsentities /namespace:uqsmodel /language:csharp /outobjectlayer:“d:/uqsobjectlayer.cs“
在此脚本中,我不编写位置以编写CSDL,SSDL和视图,但是它们是在 C: Users Adminuser 在Windows Vista和Objectlayer中生成的 D:/UQSOBJECTLAYER.CS. 。如果我使用 /模式:EntityClasseneration, this option requires the /incsdl argument and either the /project argument or the /outobjectlayer argument. The /language argument is optional.
但是我不想使用 CSDL 文件。据我了解,edmgen.tool无法创建 objectlayer 没有 CSDL 文件。现在有生成的其他方法或工具 objectlayer 来自DB?
解决方案
模式:EntityClassgeneration不会生成CSDL;它 阅读 它。您无法在不读取CSDL的情况下生成源代码(但是请注意,CSDL可以成为EDMX文件的一部分)。