将
string sqlConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["Cost3Entities"].ConnectionString;
改为:
string sqlConnectionString = @"Data Source=.sql2012;Database=Cost3;Trusted_Connection=true;Persist Security Info=True";