What is LINQ Insight?

It is an alternative of LINQPad which is developed by Devart. It provides viewing of SQL, generated for LINQ to Entities, LINQ to NHibernate, LINQ to SQL, and LinqConnect, and profiling data access events for Entity Framework, NHibernate, LinqConnect, and LINQ to SQL. To test your LINQ queries it requires… Continue reading

What is Extension method?

An extension method is a static method of a static class that can be invoked like as an instance method syntax. Extension methods are used to add new behaviors to an existing type without altering. In extension method “this” keyword is used with the first parameter and the first parameter… Continue reading

What is lambda expression?

The concept of lambda expression was introduced in C# 3.0. Typically, lambda expression is a more concise syntax of anonymous method. It is just a new way to write anonymous method. At compile time all the lambda expressions are converted into anonymous methods according to lambda expression conversion rules. The… Continue reading

What is anonymous method?

The concept of anonymous method was introduced in C# 2.0. An anonymous method is an inline unnamed method in the code. It is created using the delegate keyword and doesn’t have its name and return type. In this way, an anonymous method has no name, optional parameters and return type;… Continue reading

How var type is different from anonymous type?

var – var data type was introduced with C# 3.0. It is used to declare implicitly typed local variable means it tells the compiler to figure out the type of the variable at compile time. A var variable must be initialized at the time of declaration. For Example: var i… Continue reading

What are different methods to write LINQ Query?

There are following three ways to write LINQ Query: Query Expression (Query Syntax) : Query expression syntax is like as SQL query syntax with just a few minor deviations. The result of a query expression is a query object, which is usually a collection of type IEnumerable<T> or IQueryable<T>. This syntax… Continue reading