Best way to range check for an input for asp.net core - C#