Latest posts on tagged on "Linq"

[solved]The model item passed into the dictionary is of type 'System.Data.Entity.Infrastructure.DbQuery`1[<> f__AnonymousType2`2[System.String,System.String]]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1'

7 June 2016

When I was trying to run the application I had faced this problem. I resolved by selecting the complete object that result will consists of complete customer objects. But before I selected a subset of the customer objects, just two members.

Reverse int c# Linq?

6 June 2016

In this example I will show you how to reverse the order of the array element using c# Linq. I stored list of numbers in an integer array in a variable. I need to include namespace System.Linq and used reverse extension method. The result will be element of arrays in the opposite direction.

Passing IEnumerable string to view mvc

5 June 2016

In this example I will show you how to pass IEnumerable string to view mvc in application. I used string array with array elements contains list of names. I filtered names having length >=5 and assigned to IEnumerable string varable. The appropriate way to pass data from controller to view, is to pass the filterednames to the view

Grouping and sorting using linq in C#?

3 June 2016

Linq is very easy to read and simplifies the code. In this example we will learn about grouping and sorting using linq. Here we are filtering and Listing the group of words by string length from a string array.

How to create xml file using linq in C#?

2 June 2016

In this example I will show you how to create xml document using Linq .In order to extract data from a database and create an xml document we need to include the namespace using System.Xml.Linq.

How to find count of records using linq in asp.net?

20 April 2016

In this article I will explain how to calculate the count of the records using Linq in asp.net. This helped me when I was to show the name when the count is greater than zero.

Page 2 of 3