public class User : Entity
{
public override TableReference TableReference => new("users");
public override IReadOnlyCollection<ColumnReference> PrimaryKeyColumns =>
new[] { Id };
public ColumnReference Id =>
ColumnReference.String(this, "id");
public ColumnReference IsHappy =>
ColumnReference.Boolean(this, "is_happy");
[Assertion]
public Constraint AllUsersAreHappy()
{
return Check.For(Times.All, (User user) =>
user.IsHappy.IsEqualTo(Constant.Boolean(true)));
}
}
Spend your time thinking about your data, not our pricing.
We only have a single fully featured plan.
Ready to find problems lurking in your database?
No credit card required.
Need some more questions answered first?
Read the Docs