Rhonda Tipton’s WebLog

Random Subject Matters

Archive for the 'LINQ' Category


HDNUG Meeting - 04/10/08 - Recap

Posted by Rhonda Tipton on April 12, 2008

I attended the Houston .NET User Group meeting Thursday night where there was a great turnout of well over 100 people.  The sponsor was Clearpoint Technology.

hdnugsmall         clear point

The presentation was given by Mohammad Azam and the topic was LINQ to SQL and Gotchas.  Mohammad is a very interesting presenter and really knows his stuff.  He is what I like to call a coding presenter.  A presenter that codes their samples on the spot and does not have a ton of slides in the slide deck.  Although, he did present his first slide that read “Slide 1 of 347″  (or something like that) as a joke to break the ice.  Well it worked, he had the whole room laughing.

Below are some of the items/points presented.

  • CRUD operations using LINQ to SQL
  • The DelayLoaded property in the data designer
  • Data load options
  • LINQ to SQL as an alternative to calling Stored Procedures from C# code
  • Anonymous Data Types

Mohammad finished the presentation by going over some of the problems he encountered while working with LINQ to SQL.

There was a plethora of information in the presentation - so much it was difficult to note everything.

n663266440_780230_9260     n663266440_780232_9688

Related Content

Posted in C#, Community, LINQ, SQL Server | No Comments »

LINQ Samples and Resources

Posted by Rhonda Tipton on November 29, 2007

LINQ stands for Language INtegrated Query. It is a native querying syntax that allows languages such as C# and VB.NET to filter and enumerate through collections. For example, arrays, data sets and relational databases.

Below are a couple of simple examples as well as some great resources.

Sample #1

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

namespace LinqTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] states = { “TX”,“LA”,“FL”,“AZ”,“TN”,“AK”};

            var stateList =
                from s in states
                select s;

            Console.WriteLine(“State List:”);
            foreach (var state in stateList)
            {
                Console.WriteLine(state);
            }
        }
    }
}

Result

Sample #2

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

namespace LinqTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] states = {“TX”,“LA”,“FL”,“AZ”,“TN”,“AK”};

            var stateList =
                from s in states
                where s.Substring(0,1) == “A”
                select s;

            Console.WriteLine(“State List:”);

            foreach (var state in stateList)
            {
                Console.WriteLine(state);
            }
        }
    }
}

Result

Great Resources for LINQ

Posted in LINQ, Recommendations | No Comments »