Learning Video Executing Stored Procedure in LINQ to SQL

Source code used in Video


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StoredProcedure
{
    class Program
    {
        static void Main(string[] args)
        {
            DataClasses1DataContext context = new DataClasses1DataContext();
            // Call SP with parameter
            int studentID = 2;
            var result=  context.GetStudentGrades(studentID);
            foreach (var r in result)
            {
                Console.WriteLine(r.Grade);
            }

            // call SP with parameter
            int? a=1;
            var result1 = context.GetStudentCount(ref a);
            Console.WriteLine(a);

            Console.ReadKey(true);

        }
    }
}

***********************************************************

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to Yahoo BuzzAdd to Newsvine

About these ads

3 thoughts on “Learning Video Executing Stored Procedure in LINQ to SQL

  1. Pingback: Dew Drop – July 1, 2011 | Alvin Ashcraft's Morning Dew

  2. Pingback: Monthly Report June 2011: Total Posts 33 « debug mode……

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s