qwas368
9/27/2018 - 1:40 PM

create a localhost sql connection using windows authentication

用 windows authentication建立本地端sql連線

using (var conn = new SqlConnection("Server= localhost; Database= TEST; Integrated Security=True;"))
{
    var b = conn.Query("SELECT * FROM T1 WITH (NOLOCK)");
}