Skip to content

Commit

Permalink
add tldr for EF
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Aug 16, 2022
1 parent f805564 commit b689cb6
Showing 1 changed file with 16 additions and 0 deletions.
@@ -0,0 +1,16 @@
```cs{5-7, 9-13}
using (var context = new NewInEFContext())
{
SetupAndPopulate(context);
context.Persons
.Where(p => p.PersonId <= 500)
.ExecuteDelete();
context.Persons
.Where(p => p.PersonId <= 1_000)
.ExecuteUpdate(p =>
p.SetProperty(x => x.LastName, x => "Updated" + x.LastName)
.SetProperty(x => x.FirstName, x => "Updated" + x.FirstName));
}
```

0 comments on commit b689cb6

Please sign in to comment.