Apply lazy Loading in Your Project

JJ TT 141 Reputation points
2020-12-13T11:54:49.33+00:00

Hello,

1.
What context have you used lazy loading in your hobby project or real based project from your work experience?
(https://weblogs.asp.net/morteza/Why_and_how_to_use_lazy_initialization_in_Csharp_using_LazyT_API)

2.
Do you have applied lazy loading in startup.cs in asp.net core? Is it possibly to do it?

Thank you!

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,159 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jerry Cai-MSFT 991 Reputation points
    2020-12-14T05:14:23.66+00:00

    Hi, JJTT-0327

    1,Lazy loading is often used to one-to-many relations, and you know you will rarely need to use the related data( example:pagination ). It can reduce the initial

    load time, conserve the bandwidth and system resource.

    2,Do you mean how to use 'UseLazyLoadingProxies' method ? Add it in OnConfiguring().

    You can check this link:

    official document of lazy loading

    lazy-loading-in-entity-framework-core

    Best Regards,

    Jerry Cai


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.