Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Application Program Interviews:AutoCADBEA WeblogicBioinformaticsBizTalk ServerBug Tracking ToolsBugzillaClarify CRMCoding StandardsComputer Aided Design (CAD) DesignerCVSGIMPJMXLINQLoadRunnerMagentoMATLABMicrosoft AccessMicrosoft ExcelMicrosoft OfficeMicrosoft OutlookMicrosoft WordModel View Controller (MVC)OLAPOOADQuickbookRational RobotRDFSchemaSiebelSilkTestSVGTest PlanTesting ToolsUnity 3D DeveloperVRMLWCF SDKWPFXML DOMXPointer
Copyright © 2018. All Rights Reserved
LINQ Interview Question:
What is Linq to SQL Deferred Loading?
Submitted by: Administrator(C#) - Deferred Loading is a property of Linq to sql, by default it is set true,
Example - Let's have two tables -
Blogs Table (BlogID ,Blog Name,owner) and Post table ( PostID, BlogID, Title, Body)
To find Name and No's of posts in each blog:
BlogDataContext ctx = new BlogDataContext( );
var query = from b in ctx.Blogs select b;
foreach (Blog b in query)
{
Console.WriteLine("{0} has {1} posts", b.BlogName,
b.Posts.Count);
}
Output of queries Produce Blog name with no's of post, But For each Blog Looping will be occurs (in case long list of blogs) that's reduces Overall Performance that's called the Deferred loading.
Submitted by: Administrator
Example - Let's have two tables -
Blogs Table (BlogID ,Blog Name,owner) and Post table ( PostID, BlogID, Title, Body)
To find Name and No's of posts in each blog:
BlogDataContext ctx = new BlogDataContext( );
var query = from b in ctx.Blogs select b;
foreach (Blog b in query)
{
Console.WriteLine("{0} has {1} posts", b.BlogName,
b.Posts.Count);
}
Output of queries Produce Blog name with no's of post, But For each Blog Looping will be occurs (in case long list of blogs) that's reduces Overall Performance that's called the Deferred loading.
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.