Is it possible to add CHECK constraint with fluent API in Entity Framework 7?
I need to acheive something like this:
...
ADD CONSTRAINT CK_SomeTable_SomeColumn CHECK (SomeColumn >= X);
It is ok if solution is provider-specific - I am targeting MsSqlServer only (at least now).
public sealed class ProfileStatus { public string Name { get; } public static readonly ProfileStatus Public = new ProfileStatus("Public"); public static readonly ProfileStatus Private = new ProfileStatus("Private"); public static readonly ProfileStatus VerifiedOnly = new ProfileStatus("VerifiedOnly"); private ProfileStatus(string name) { Name = name; } }
And I can not get it the format correctly, sorry... – Oshaughnessy