eager loading vs lazy loading c#
When to use eager loading
In "one side" of one-to-many relations that you sure are used every where with main entity. like User property of an Article. Category property of a Product.
Generally When relations are not too much and eager loading will be good practice to reduce further queries on server.
When to use lazy loading
Almost on every "collection side" of one-to-many relations. like Articles of User or Products of a Category
You exactly know that you will not need a property instantly.
Note: like Transcendent said there may be disposal problem with lazy loading.
Also in C#:
- C# assigning image location
- godot c# move towards
- how to change an int value c#
- c# console writeline color
- how to convert object in string JSON c#
- How to execute a script after the c# function executed
- visual c#
- how to put double quotes in a string c#
- how to create a list in c# unity
- unity resources load
- Assets\playermove.cs(30,37): error CS1003: Syntax error, ',' expected
- image filter
- postasync c# returns null
- c# read file stream
- c# random string
- c# round number up
- c# string remove special characters
- read xml file c#
- out parameters c#
- c# odd even median
- c sharp tryparse
- how to remove file changes in git
- unity c# write line
- unity drawline