SqlMetal does not create views, functions or stored procedures

I use the following commands as part of a cmd file:

sqlmetal /server:localhost\SQLEXPRESS /database:DashBoard /dbml:DataClasses.dbml /namespace:DashBoard.Data
sqlmetal /server:localhost\SQLEXPRESS /database:DashBoard /views /functions /sprocs /code:DataClasses.designer.cs /context:DataClassesDataContext /namespace:DashBoard.Data DataClasses.dbml

Anyone having trouble creating code to use views, functions, or stored procedures using SqlMetal? Files point to table links as expected, but the / views / functions and / sprocs switches do not seem to have an effect.

I am using SqlMetal 1.00.30729, SQL Server 2005 Express on my local computer, and the web application is ASP.NET 3.5.

+3
source share
1 answer

Instead, I had to use the following commands:

sqlmetal /server:localhost\SQLEXPRESS /database:DashBoard /views /functions /sprocs /dbml:DataClasses.dbml /namespace:DashBoard.Data
sqlmetal /server:localhost\SQLEXPRESS /database:DashBoard /code:DataClasses.designer.cs /context:DataClassesDataContext /namespace:DashBoard.Data DataClasses.dbml
+4
source

Source: https://habr.com/ru/post/1727290/


All Articles