top of page

Entity Framework & LinQ Questions

This section of the interview questions contains the ORM related questions and Linq related questions which are quite useful when preparing for the Linq and Eneity framework.

Entity Framework Questions

 

1. What is Entity Framework?

2. What are the benefits of using EF?

3. What are the different ways of creating these domain / entity objects?

4. What is pluralize and singularize in the Entity Framework dialog box?

5. What is the importance of EDMX file in Entity Framework?

6. Can you explain CSDL, SSDL, and MSL sections in an EDMX file?

7. What are T4 templates?

8. What is the importance of T4 in Entity Framework?

9. How can we read records using Entity Framework classes?

10. How can we add, update, and delete using EF?

11. People say Entity Framework runs slow

12. Can you explain lazy loading in a detailed manner?

13. How can we turn off lazy loading?

14. How can we use Stored Procedures in Entity Framework?

15. What are POCO classes in Entity Framework?

16. How do we implement POCO in Entity Framework?

17. In POCO classes do we need EDMX files?

18. What is Code First approach in Entity Framework?

19. What is the difference between POCO, Code First, and the simple EF approach?

20. How can we handle concurrency in Entity Framework?

21. How can we do pessimistic locking in Entity Framework?

22. What are client wins and store wins mode in Entity Framework concurrency?

23. What are scalar and navigation properties in Entity Framework?

24. What are complex types in Entity Framework?

25. What’s the difference between LINQ to SQL and Entity Framework?

26. What is the difference between DbContext and ObjectContext?

27. What is ADO.NET Entity Framework or EF?

28. History of ADO.NET Entity Framework

29. What is minimum requirement for Entity Framework applications to run?

30. What are the benefits of using Entity Framework or EF?

31. What is Entity Data Model (EDM)?

32. What is .edmx file and what it contains?

33. What are the main parts in EDM?

34. What are CSDL, SSDL and MSL sections in an EDMX file?

35. What are the languages used in entity framework?

36. What is Entity SQL?

37. What is LINQ to Entities?

38. What is Native SQL?

39. What are the types of entities in entity framework?

40. What is the difference between DbContext and ObjectContext?

41. What are the main drawbacks of Entity Framework?

42. How to load related Entities in EF.

43. What is Lazy Loading?

44. What is Eager Loading?

45. What is Explicit Loading?

46. How can we turn off lazy loading?

47. When we will use lazy Loading?

48. What are the types of development approaches in EF?

49. What is Code First approach in Entity Framework?

50. What is Model First Approach in Entity Framework?

51. What is Model First Approach in Entity Framework?

52. Which development approach is suitable for which conditions?

53. Entity Framework vs LINQ-to-SQL

54. What do you mean by Navigation Property?

55. What are POCO classes in Entity Framework?

56. In POCO classes do we need EDMX files?

57. What are T4 templates?

58. What is the importance of T4 in Entity Framework?

59. Give an example of EF select query

60. Give an example of EF join query

61. Write the query to return a generic list in EF

62. Give an example of EF insert query

63. Give an example of EF update query

64. Give an example of EF delete query

65. How to call stored procedure in Entity Framework?

66. What are the return types of stored procedure in entity framework?

67. What’s the difference between LINQ to SQL and Entity framework?

68. What are CSDL, SSDL and MSL?

69. What is the work of EDMX file?

70. How can we browse using entity framework classes?

71. How can we add, update and delete using EF?

72. How can we use stored procedures in entity frame work?

73. What are POCO classes in Entity framework?

74. How to implement POCO in entity framework?

75. In POCO classes do we will need EDMX files?

75. What is code first approach in entity framework?

76. How can implement code first in entity framework?

77. What is the difference between POCO, code first and simple EF approach?

78. How can we handle concurrency in Entity framework?

79. How can we do pessimistic locking in Entity framework?

80. What is client wins and store wins mode in entity framework concurrency?

81. What is Lazy Loading in Entity framework?

82. How can we turn off lazy loading?

83. What are navigation properties in Entity framework?

84. What are complex types in Entity framework?

85. What is minimum requirement for Entity Framework applications to run?

 

LINQ Interview Questions

 

1. What is LINQ and why to use it?

2. Which namespace is necessary to use LINQ?

3. What are different flavors of LINQ?

4. What are advantages of LINQ?

5. What are disadvantages of LINQ?

6. What are different methods to write LINQ Query?

7. How var type is different from anonymous type?

8. What is anonymous method?

9. What is lambda expression?

10. What is Extension method?

11. What is LINQPad?

12. What LINQ providers are supported by LINQPad?

13. What is LINQ Insight?

14. What are Quantifiers?

15. What are different types of operators in LINQ?

16. What are aggregate operators?

17. What are conversion operators?

18. What are element operators?

19. What is difference among Single, SingleOrDefault, First and FirstOrDefault?

20. When to use Single, SingleOrDefault, First and FirstOrDefault?

21. Which one is fast between SingleOrDefault and FirstOrDefault?

22. What is LINQ provider and what are different types of LINQ providers?

23. What are advantages of using LINQ on DataSet?

24. What is difference between Select and SelectMany in LINQ?

25. What is difference among Any, All and Contains?

26. What is difference between into and let keyword in LINQ?

27. Explain Union, Intersect and Except?

28. What is the extension of the file, when LINQ to SQL is used?

29. What is data context class? Explain its role?

30. What are deferred execution and immediate execution?

31. What are lazy/deferred loading and eager loading?

32. Can you disable lazy/deferred loading?

33. What is explicit loading?

34. What are different types of joins in LINQ?

35. How to write LINQ query for Inner Join with and condition?

36. How to write LINQ query for Inner Join with OR condition?

37. Write LINQ query to find 2nd highest salary?

38. How to use GroupBy in LINQ?

39. How to use Having in LINQ?

40. What is Expression?

41. What is Expression Trees?

42. How can you create Expression Trees?

43. How Expressions Trees are different from Lambda Expression?

44. How LINQ query is compiled to Expression Trees?

45. What is difference between IEnumerable and IQueryable?

46. When to use var or IEnumerable to store query result in LINQ?

47. What is difference between IEnumerable and IList?

48. What is SQL metal in LINQ?

49. What is difference between LINQ and Stored Procedures?

50. What are disadvantages of LINQ over Stored Procedures?

51. What is difference between XElement and XDocument?

52. What is difference between XElement.Load() and XDocument.Load()?

53.Pros and cons of LINQ (Language-Integrated Query)

54.Difference between LINQ and Stored Procedures.? Disadvantages of LINQ over Stored Procedures?

55.Can I use LINQ with databases other than SQL Server? Explain how

56.What is Linq to SQL Deferred Loading?

57. Write a Program using Skip and Take operators. How can it beneficial for bulky data accessing on page?

58. Write a Program for Concat to create one sequence of Data Rows that contains DataTables's Data Rows, one after the other.

59. How can you find average of student marks from student tables (Columns are StudentID, Marks)?

60. What is Lambda Expressions? How can we optimize our linq code using this Expression?

61. What is “OfType” in linq?

62. How can we find that Sequence of Items in two different array (same Type) in the same order using linq query?

63. Differentiate between Conversion Operator “IEnumerable” and “ToDictionary” of linq.

64. Why is Linq beneficial than Store Procedure?

65. List out the Data Context Functions. Where do we use “SubmitChanges()”?

66. Why do we use “Contains” method for strings type functions?

67. Partition following list of numbers by their remainder when divided by “3”-

{

Var numbers()={5, 4, 1, 3, 9, 8, 6, 7, 2, 0}

}

68. Can you Concat two arrays to create one sequence that contains each array's values, one after the other?

69. Write a small Program to generate Xml Document from table like (StudentRecord Table) using linq query.

70. What is Quantifiers in reference linq to Dataset?

 

 

 

bottom of page