I'm using SQL CLR integration, with the idea that we store data with general types like (char, int), but then contextualize the data with constraints, specifically 'check' constraints.
Create a data type in a visual studio database project (C#) which internally stores the value as a primitive type (e.g. int, float, string, etc.), but constrains the values it can be constructed with. For example, if you had a Score type, the constructor would throw an error if the value is outside the range of 0 to 100, ensuring that only valid Score objects can exist.
Your check constraint in the database table would simply involve calling a CLR function (which you would also create in your database project) that just tries to construct an instance of your C# data type with the new column value that you pass to it. The function succeeds if the value is constructed, and fails if the constructor throws an error.
You then have a constrained data type, centralized in your C# code, usable throughout your application, which also enforces values in the database.