配置到webconfig文件中,如下:
<connectionStrings>
<add name="museumContext" connectionString="data source=192.168.1.200;initial catalog=museum;persist security info=True;user id=sa;password=123456;multipleactiveresultsets=True;" providerName="System.Data.SqlClient" />
</connectionStrings>