是否有任何特殊原因,我缺少,因为连接字符串需要作为字符串,但不作为对象公开?我的意思是'Data Source=MSSQL1;Initial Catalog=AdventureWorks;Integrated Security=true',如果我们可以在某种依赖注入服务公开的对象中设置完全相同的选项,为什么我们总是要构造一个这种丑陋形式的字符串.或者其他任何能够消除我们用心学习关键词的需要的东西.
'Data Source=MSSQL1;Initial Catalog=AdventureWorks;Integrated Security=true'
.net c# entity-framework
.net ×1
c# ×1
entity-framework ×1