Is it possible to add a CHECK constraint using the free API in Entity Framework 7?
I need to get something like this:
... ADD CONSTRAINT CK_SomeTable_SomeColumn CHECK (SomeColumn >= X);
This is normal if the solution is specific to the provider - I only target MsSqlServer (at least for now).
Compared to EF 7.0.0-rc1, this is not possible using the free API.
You can define the restriction manually in the migration section.
migrationBuilder.Sql("ADD CONSTRAINT CK_SomeTable_SomeColumn CHECK (SomeColumn >= X);");
Source: https://habr.com/ru/post/1619658/More articles:Is there any java bean generation in eclipse? - eclipseInstead, a php 7 file is loaded instead of a file, instead of - phpHow can I use this parallel sum function to use vector instructions? - c ++RecyclerView with packaging content elements - androidOverwrite __init__ from a complex object - pythonDatabase queries freeze for 5-6 seconds every minute - c #Does ECMAScript-6 import a nested function? - javascriptWatchman.plist permission not allowed when starting an initiative source project - node.jsWhy do you need to redefine serialVersionUID if you extend the class that implements Serializable "down the line"? - javaWatchman ERROR - no-pretty get-sockname when starting npm start - npmAll Articles