-Annie-

IntroEntityFramework

Oct 22nd, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.79 KB | None | 0 0
  1. USING System;
  2. USING System.DATA.SqlClient;
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         string connectionString = "Server=ACER-5253G\\SQLEXPRESS; Database=SoftUni; Trusted_Connection=True";
  8.         SqlConnection connection = NEW SqlConnection(connectionString);
  9.         connection.OPEN();
  10.         USING (connection)
  11.         {
  12.             string creationCommandString = "INSERT INTO JudgeFails VALUES " +
  13.                                                    "('Judge RIP', 300), " +
  14.                                                    "('Judge Reborn', 200)"
  15.                                                    ;
  16.             SqlCommand createCommand = NEW SqlCommand(creationCommandString, connection);
  17.             Console.WriteLine(createCommand.ExecuteNonQuery());
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment