This article is a mirror article of machine translation, please click here to jump to the original article.

View: 19440|Reply: 1

[Source] EF basic operations add, delete, check, modify, paginate, join...... etc

[Copy link]
Posted on 10/25/2018 10:59:48 AM | | |
1. Add data in batches

Through the above comparison, if you add a new piece of data every time, use EF SaveChanges once, which will consume a lot of performance.

2. Batch deletion

Query the results to ensure that there is a value in the database before deleting it.

3. EF edits data

The first way is to edit after querying;

The second way is to directly pass in a model entity that needs to be modified, which can be part of the field


4. How to use join in EF

5. EF pagination query



6. Invocation of EF stored procedures



7. Execute SQL in EF



8. EF's method of improving query AsNoTracking

9. Use of Set <T>generic method in EF context container







Previous:Geek Wars is a game for children to learn Python programming, and I played it with my son
Next:Notes on "Treat Time as a Friend"
Posted on 10/25/2018 2:41:21 PM |
Life is more than programming
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com