LINQ Interview Questions and Answers Part 5

By // No comments:
1.) What are the types of LINQ Providers?                                                                            
There are some types of LINQ Providers as given below:-
  • LINQ  to SQL
  • LINQ to Objects
  • LINQ to Data sets
  • LINQ to XML
  • LINQ to Entities
2.) Can we use 'having' clause in LINQ like sql?                                                                  
Yes.

3.) What is extension of file,when we use LINQ to SQL?                                                 
.dbml  extension

4.) Why do we use string in LINQ?                                                                                           
LINQ is used to query and transform strings and collections of strings.It is useful with semi-structure data in the text file.
3

LINQ Interview Questions and Answers Part 2

By // No comments:
1. ) What is Anonymous Methods?                                                                                            
Anonymous method allow you to handle an event rather having a separate event handler.   Suppose you want to display some message to users at a click of a button ,ypu can handle it in a standard way with a delegate and event handler or you can also perform this action using anonymous method.
There are some points about anonymous method as given below:-

  • You can not have a jump statement,Break,Go to and continue in an anonymous method.
  • If your program contains same functionality more than once ,you should not use anonymous method.
  • You should also not use an unsafe code inside an anonymous method.
3

LINQ Interview Questions and Answers Part 3

By // No comments:
1.) What are Standard Query operators in LINQ ?                                                             
The standard query operators are the methods that form the LINQ pattern.These operators provide query capabilities including filtering ,projection,aggregation and sorting.The standard query operator in LINQ is an application programming interface (API) that enables querying of any .NET array or collection.
There are two set of standard query operators in LINQ.
  1. Operator on objects of the type IEnumerables <T>
  2. Operator on objects of the type IQueryable <T>
3

Linq Query Interview Questions and Answers Part 1

By // No comments:
1.) What is LINQ ?                                                                                                                            
LINQ stands for language Integrated query.It was introduced as a new component of .NET Framework 3.0 .Its syntax is similar to Structure Query Language (SQL).Linq is a programming model that is used to provide a consistent method to obtain and manipulate the data.It can  easily perform some query operations from various data sources like  SQL,XML,Web services ,Dataset etc.LINQ Query performs additional operations such as sorting ,ordering and grouping the retrieved data.

2.) Why does we use LINQ Query?                                                                                            
There are following reasons to use LINQ Query as given below:-
  • LINQ Provide full type checking at compile time.
  • LINQ is used with c# and vb .net in .NET Framework.
  • LINQ Provides uniform programming models (use common query for different data sources).
3

LINQ Interview Questions and Answers Part 4

By // No comments:
1.) What are partitioning operators ?                                                                                      
The Partitioning operators in LINQ are used to divide an input  sequence into two sections without rearranging the elements and then retrieving the result  set with one of the sections that satisfies the given condition.
There are following clause are used with partitioning  operators.
  • Take
  • Skip
  • TakeWhile
Syntax:-
public static IEnumerable Skip
    (this IEnumerable source, int count);

2.) What are set operators in LINQ ?                                                                                       
The set operators in LING refer to the query operators that produce a result set.The result set based on the presence  or  absence of the equivalent elements that are present within the same clauses used in set operators.
3
Powered by Blogger.