LINQ to SharePoint with WCF 4.0

Objective How could we perform CRUD operations on SharePoint 2010 List from a WCF Service? Assume we need to create a WCF Service and that service will perform CRUD operation on SharePoint 2010 list. We are going to see that in this article. Flow Diagram Now we will follow the below steps to perform allContinueContinue reading “LINQ to SharePoint with WCF 4.0”

LINQ to SharePoint: CRUD operation on SharePoint 2010 list using SPLinq

Objective In this article, we will see how to work with LINQ to SharePoint. I have tried to address all the common errors we encounter when first time we start using LINQ against SharePoint. We will see , 1. How to insert an item in SharePoint list using SPLinq 2. How to update an itemContinueContinue reading “LINQ to SharePoint: CRUD operation on SharePoint 2010 list using SPLinq”

LINQ to SharePoint: SPLinq in SharePoint2010

Objective In this article, we will see how to work with LINQ to SharePoint. I have tried to address all the common errors we encounter when first time we start using LINQ against SharePoint. Assumption We have a custom list 1. Name of the list is Test_Product. 2. Columns of the list is as belowContinueContinue reading “LINQ to SharePoint: SPLinq in SharePoint2010”

Select and SelectMany: LINQ projection operator

Projection transforms the query result into the form defined by the developer. There are two projection operators in LINQ Let us say, there is a class And a function returning List<Student> as below, Select operator Below query will return name and roll number of all the students. Output Below query will project name of theContinueContinue reading “Select and SelectMany: LINQ projection operator”

Learning Video on LINQ to SQL Class

Source Code using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication9 { class Program { static void Main(string[] args) { StudentDemoDataContext context = new StudentDemoDataContext(); #region Reterive //Reteriving all the Records foreach (var r in context.Students) { Console.WriteLine(r.Name + r.Subject); } #endregion #region Insert Student std = new Student { RollNumber = “8”, NameContinueContinue reading “Learning Video on LINQ to SQL Class”

LINQ with IIS sites and web Applications

Objective In this article, we will see how to work with LINQ against IIS. Before applying LINQ against IIS sites and application pool, we need to set up the environment. Follow the bellows steps to do this. Step 1 Down load Microsoft.Web.Administration.dll and save to a particular directory. I am saving it in D driveContinueContinue reading “LINQ with IIS sites and web Applications”

Inserting and Retrieving Image using LINQ to SQL from ASP.Net Application

Objective In this article, I am going to show you 1. How to insert an image from ASP.Net application to SQL Server using LINQ to SQL. 2. How to retrieve image from SQL Server data base using LINQ to SQL and display to an Image control. Block Diagram of solution Description of table For myContinueContinue reading “Inserting and Retrieving Image using LINQ to SQL from ASP.Net Application”

7 queries on LINQ to SQL class

 In this article, I am going to show you how we can perform various operations using LINQ to SQL. Database description Let us say, I have created a database called ILPTrainee. This table got only one table with below structure EmpId is primary key here. For our explanation, I have put few records in theContinueContinue reading “7 queries on LINQ to SQL class”

LINQ to Object Part #4: Querying Non- IEnumerable collections

Objective In this article, I am going to show, how we could apply LINQ to query non-IEnumerable<T> Collections. I have created a class for my explanation purpose. Student class is having details of students.  Student.cs     1 using System;     2 using System.Collections.Generic;     3 using System.Linq;     4 using System.Text;     5      6 namespace LINQtoOBJECT1     7 {     8      public  class Student     9     {    10     11    ContinueContinue reading “LINQ to Object Part #4: Querying Non- IEnumerable collections”

LINQ to Object Part #3: Grouping

Objective In this article, I am going to show, how we could achieve grouping in LINQ to object I have created two classes for my explanation purpose. Student class is having details of students and Hostel class is having details of hostel. Both classes are having a properties HostelNumber common. I will be using thisContinueContinue reading “LINQ to Object Part #3: Grouping”