我在EF的项目中使用了这条命令
Scaffold-DbContext "Data Source=.;Initial Catalog=EFCore_dbfirst;User ID=sa;Password=sa.123" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
但是只能生成数据库表的模型,请问需要加什么参数,或者使用什么命令才能生成出数据库视图的模型
我在EF的项目中使用了这条命令
Scaffold-DbContext "Data Source=.;Initial Catalog=EFCore_dbfirst;User ID=sa;Password=sa.123" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
但是只能生成数据库表的模型,请问需要加什么参数,或者使用什么命令才能生成出数据库视图的模型
http://stackoverflow.com/questions/13593845/how-to-create-a-view-using-ef-code-first-poco
按照这个帖子的回答,ef codefirst不能生成视图,但是可以嵌入sql语句,让它创建view