建立数据库连接字符串和上下文实体类生成

第一步:dotnet user-secrets set ConnectionStrings.tm2020 "Data Source=******;Initial Catalog=******;user id=******;password=******;"
建立加密字符串
第二步:生成上下文类
Scaffold-DbContext name=ConnectionStrings.****** Microsoft.EntityFrameworkCore.SqlServer -Context tmdata -OutputDir Models

 

posted on 2020-04-03 10:17  烟台天铭网络  阅读(145)  评论(0)    收藏  举报