Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to temporarily disable entity validation on EF 7?

On EF6 it is possible to temporarily disable entity validation:

context.Configuration.ValidateOnSaveEnabled = false;
context.SaveChanges();
context.Configuration.ValidateOnSaveEnabled = true;

How can we achieve this in EF7?

like image 300
feradz Avatar asked Feb 07 '16 00:02

feradz


1 Answers

There is no validation in EF7 / EF Core.

See this github issue for more info: https://github.com/dotnet/efcore/issues/5224

like image 87
ErikEJ Avatar answered Oct 20 '22 01:10

ErikEJ