Video Executing SQL Query in LINQ to SQL


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

namespace ExecutingSQLQuery
{
    class Program
    {
        static void Main(string[] args)
        {
            DataClasses1DataContext context = new DataClasses1DataContext();
            int a = 1;
            var result = context.ExecuteQuery<Person>("select * from Person where PersonID= {0}",a);
            foreach (var r in result)
            {
                Console.WriteLine(r.FirstName + r.LastName);
            }
            Console.ReadKey(true);
            var result1 = context.ExecuteQuery<Person>("select * from Person");
            foreach (var r in result1)
            {
                Console.WriteLine(r.FirstName + r.LastName);
            }

            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

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

Windows Phone SDK 7.1 Beta 2 released: installation steps

Note : Content of this post is taken as it is from release note of Windows Phone SDK 7.1 . Please read release document more carefully. I have listed the breaking relase opints as it is from there. Original content is on relase note.

On 27th June 2011 Windows Phone SDK 7.1 Beta 2 got released.

 

clip_image001

 

You can download it from below link,

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26648

Release information is as below,

image

If you installed Windows Phone Developer Tools 7.1 Beta 1, you must uninstall it before installing Windows Phone SDK 7.1 Beta 2.

Few points ,

  1. There are many known issue in the release. So before installing read release document very carefully.
  2. There are many breaking changes like

 

  • Touch input for the ScrollViewer and ListBox controls happens on an independent thread by default, instead of on the UI thread.
  • Image decoding happens on a background thread by default, instead of on the UI thread.
  • The TaiwanCalendar class has been removed from the API.
  • The OnCancel override method was removed from the ScheduledTaskAgent class.
  • The IsRunningSlowly property was removed from the GameTimerEventArgs class.
  • IExecuteResult was removed from the Windows Phone OS 7.1 API.
  • The MotionReading property types have changed.
  • The Background Transfer Service folder in isolated storage was renamed.
  • Tile data in isolated storage must use the folder Shared\ShellContent.
  • The ShellTileEnumerator class was removed.
  • Background agents are not launched in the debugger by using the Add and Find methods.
  • The maximum and default database and buffer pool size values are now lower for SQLCE databases.
  • . Connection string parameters that are not supported are removed.
  • . Microsoft.Devices.YCrCbPixelLayout was renamed to Microsoft.Devices.YCbCrPixelLayout.
  • Microsoft.Devices.CaptureResolution was removed.

 

Installation of Winows Phone SDK 7.1 Beta 2

First uninstall Windows Phone SDK 7.1. Uninstall below items

  1. Windows Phone SDK 7.1 Beta
  2. Windows Phone Emulator (Beta)
  3. Microsoft Windows Phone Developer Tools 7.1

 

image

 

clip_image001

After uninstalling Beta 1 install Beta 2.

Screen shorts are as below Smile

clip_image002

 

clip_image003

 

 

clip_image004

 

 

clip_image005

 

clip_image006clip_image007

image

Enjoy with Windows Phone 7.1 Beta 2 Smile

 

 

 



----------------------------------------------------------

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