-
Before some time I have written a blog post about the SkipWhile operator and a reader of my blog asked me that we can do the same thing with Where also but there is a difference between this two. So In this post I am going to explain you difference between those two. Where operator filters a list of...
-
In this post I am going to explain TakeWhile Operator in details. TakeWhile is one of partitioning operator available in Linq. It will take sequence until condition becomes false. Here is the example for that. using System; using System.Collections.Generic; using System.Linq; namespace Linq { class Program...
-
What’s wrong with the following code? var names = new HashSet<string>(StringComparer.OrdinalIgnoreCase); ... if (names.Contains(sqlCommand.ExecuteScalar()) This code is intended to check whether the result of a SQL query is contained in a case-insensitive collection of names. However...
-
In this post I am going to explain you how we can create a basic RSS Reader with the help of Linq-To-Xml and ASP.NET MVC3 Razor. Those who are writing or reading Blogs already knows what is RSS Reader. But those who does not know What is RSS. Below is the definition for RSS as per Wikipedia . RSS...
-
In this post I am going to explain how we can bind a Enum with ASP.NET List Controls. These comprise of four different types of control, CheckBoxList, DropDownList, ListBox and RadioButtonList. This is one of the common requirements during development to bind a Enum with List Control and challenge is...
-
Linq operator provides great flexibility and easy way of coding. Let’s again take one more example of distinct operator. As name suggest it will find the distinct elements from IEnumerable. Let’s take an example of array in console application and then we will again print array to see is it working or...
-
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 Name of the list is Test_Product . Columns of the list is as below , There are...
-
Objective In this article we will see, How to create custom WebPart. How to use SPGridView on visual WebPart. How to use LINQ to SharePoint How to deploy the WebPart in SharePoint site. Step 1 Open Visual studio 2010 and create new project. From SharePoint 2010 project template select Visual Web Part...
-
This article will show you , how could we use Predicate , Anonymous method and Lambdas with LINQ to find out all odd numbers from a range of number. If we have a range of number from 1 to 20 and we want to find odd among them using LINQ . We have three options for that Calling a Predicate Anonymous...
-
Projection helps us developer to retrieve desired result from the collection . LINQ provides two projection operator. Select and SelectMany. Select works with one collection whereas SelectMany works with more than one collection. Projection transforms the query result into the form defined by the...
-
Microsoft Entity Framework version 4.0 is a brand new ORM(Object Relational Mapper) from Microsoft. It’s provides now some new features which are not there in the earlier version of Entity framework. Let’s walk through a simple example of a new features which will create a new Entity class...
Posted to
DotNetJalps-SQL
by
Jalpesh
on
08-17-2010
Filed under:
Filed under: Linq-To-SQL, Entity, BRH, #DATAACCESS, #DOTNET, #LINQ, LINQ, Entity Framework, EF4.0, Linq-To-Entities, ADO.NET Entity Framework, #ASP.NET
-
What we learned previously In my previous articles we learned Projection Operators/Ordering Operators and Grouping Operators/Join Operators . In this article we are going to see few more operators like Set Aggregate Set Operators In set operator we will going to see Union , Intersect and Except ; which...
-
The code below demonstrates several features of working with System.Drawing.Image object together with LINQ to SQL, which maps a byte[] to the System.Data.Linq.Binary type. In addition, the code also demonstrates how to convert between byte[] and System.Drawing.Image. Hope you find it useful. -- Script...
-
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...
-
I have already written several post about Linq its a great ORM that we can use in various way. The purpose of this post to demonstrate How we can bind custom entity to stored procedure result with use of Linq-To-SQL. Let’s go through it and you will realize that how easy it will be to bind a Custom...