Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to AddOrUpdate in EF 7 / Core?

I'm writing a seed method using EntityFramework.Core 7.0.0-rc1-final.

What happened to the AddOrUpdate method of DbSet?

like image 729
Paul Sohal Avatar asked Mar 24 '16 19:03

Paul Sohal


People also ask

Can Core 3.1 Use EF Core 5?

EF Core 5.0 requires a . NET Standard 2.1 platform. This means EF Core 5.0 will run on . NET Core 3.1 or .

Is EF core good?

The conclusions are obvious: in almost every test conducted by Chad, Entity Framework Core 3 is faster than Entity Framework 6 – exactly 2.25 to 4.15 times faster! So if performance is important to your application and it operates on large amounts of data, EF Core should be a natural choice.

Does EF core support inheritance?

By default, EF maps the inheritance using the table-per-hierarchy (TPH) pattern. TPH uses a single table to store the data for all types in the hierarchy, and a discriminator column is used to identify which type each row represents.

How do I update my EF core model?

Right-click anywhere on the design surface, and select Update Model from Database... In the Update Wizard, select the Refresh tab and select your table then click Finish button. This is only possible up until EF6 and lower - and not the core variant, as requested.


1 Answers

It's waiting to be implemented. See issues #629 & #4526.

Update: according to comments below (unverified) - this feature is finally slated for release in .NET Core 2.1!

like image 191
bricelam Avatar answered Sep 17 '22 15:09

bricelam