Bulk Updates Made Easy With EF Core 7 #shorts

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

How do you add condition. This looks like it will update all the records

johnolawale
Автор

Would you know how to extend the behavior of ExecuteUpdate for before and after operatios, I read that it can be done with interceptors but I had no luck. Any help is much appreciated! Thank you!

Dpaz
Автор

Good feature but why not just emit a sql statement directly?

edwinskwok
Автор

Not good for a strong domain model who protects invariants and triggers behavior. But for a migration or some specific use case it might make sense

patrickroza
Автор

Im not sure if i agree with using c# to generate sql queries.

Ive become more focused reducing reliance on code that requires a compilation step on change.

TheScriptPunk
Автор

When we are updating using foreach how many queries does it generate i mean, upon saving savechanges how many queries will be generated.

saithonukunoori
Автор

how inserted when not foun on element?

juantaday
Автор

Does it will go to dbcontext savechanges? Because I override the dbcontext savechanges.

amierulbasyaryusoff
Автор

how to do bulk update if we want to update different property value instead of same one ?

praoth
Автор

Hep can İ change my text color like yours

oktayarslan
Автор

How can implement ExecuteUpdate in a repository? since i need to pass a parameter to the function from my cqrs handler, i dont want my logic in the repo

in delete method i have something like this and works well:

public async Task Delete(int id)
=>
await db.Set<Customer>().Where(c => c.Id == id).ExecuteDeleteAsync();

booby
Автор

Hello Milan. How can we do this in a DDD? following clean architecture. My update method is strictly inside my domain model

eliesamyoun
Автор

How about UDTs and TVPs? Isn't it will be faster through UDTs and TVPs.

liontalha
Автор

What is the difference between updateRange and executeUpdate

pooventhanrajl
Автор

What if you want to pass a list products to a bulk update

So say u have a an entity products id = 1 ; price = 2 .... id = 2 ; price = 3


Now you want to pass this list back for bulk upload

James