Sitemap

Member-only story

๐–๐ก๐š๐ญ ๐ข๐ฌ .๐€๐ฌ๐๐จ๐“๐ซ๐š๐œ๐ค๐ข๐ง๐ () , ๐ฐ๐ก๐š๐ญ ๐ข๐ฌ ๐›๐ž๐ง๐ž๐Ÿ๐ข๐ญ ๐จ๐Ÿ ๐ฎ๐ฌ๐ข๐ง๐  ๐ข๐ญ ๐š๐ง๐ ๐ฐ๐ก๐ž๐ง ๐ฐ๐ž ๐ฌ๐ก๐จ๐ฎ๐ฅ๐ ๐ฎ๐ฌ๐ž ๐ข๐ญ ?

Dec 7, 2022

--

๐–๐ก๐ข๐ฅ๐ž ๐ฎ๐ฌ๐ข๐ง๐  ๐€๐ฌ๐๐จ๐“๐ซ๐š๐œ๐ค๐ข๐ง๐ 
1. The entity is not tracked by the context.
2. EF does not know the state of its entity.
3 Not recommended when you are performing Add/Update/Delete kind operations
4. Improved performance over regular LINQ queries.
5. Only recommended when you are doing read-only operations.
6. Most efficient when we have to retrieve large set of data.

๐–๐ข๐ญ๐ก๐จ๐ฎ๐ญ ๐€๐ฌ๐๐จ๐“๐ซ๐š๐œ๐ค๐ข๐ง๐ 
1. The entity is tracked by the context.
2. EF knows the state of this entity.
3. We can use this entity to save/update and we donโ€™t need to set the state of entity again.

Press enter or click to view image in full size

If you like my work you can help me in growing through following ways

  1. Connect with me on LinkedIn and Twitter
  2. Buy me a Coffee

--

--

Muhammad Waseem
Muhammad Waseem

Written by Muhammad Waseem

Senior Software Engineer (.NET) writing about AI, software, side hustles, and building income from skills. Contact: mwaseemzakir.com | mwaseemzakir@gmail.com