title: Executing Queries in LINQ to SQL
body: <p>How do I execute a query using LINQ to SQL? a query that something goes like this.</p>
  
  <p>Let's say I have this table</p>
  
  <pre><code>CREATE TABLE dbo.Students
  (
    StudentID INT IDENTITY(1,1) PRIMARY KEY,
    Name SYSNAME
  );
  
  CREATE TABLE dbo.StudentLoans
  (
    LoanID INT IDENTITY(1,1) PRIMARY KEY,
    StudentID INT FOREIGN KEY REFERENCES dbo.Students(StudentID),
    Amount BIGINT -- just being funny
  );
  </code></pre>
  
  <p>Then I wanted to execute this query.</p>
  
  <pre><code>DECLARE 
    @Name       SYSNAME = N'user962206', 
    @LoanAmount BIGINT = 50000,
    @StudentID  INT;
  
  INSERT dbo.Students(Name) 
    SELECT @Name;
  
  SELECT @StudentID = SCOPE_IDENTITY();
  
  INSERT dbo.StudentLoans(StudentID, Amount)
    SELECT @StudentID, @LoanAmount;
  </code></pre>
  
  <p>Is that possible? even if your Rows and Columns are mapped?  how can I execute that query with LINQ to SQL ?</p>