I have the below method, which I need to check for whether the arguments are empty or null.
public DB Where(string field, string operat, string value, s
Firstly, you can use simple libraries to do argument validation. Check out this one called Argument Validator, which has handy functions that will reduce your overall code by half.
Here is an example on how you could do it using the argument validator library:
public DB Where(string field, string operat, string value, string andOr, string field2, string operat2, string value2)
{
var inputs = new string[] {field, operat, value, andOr, field2, operat2, value2};
foreach(var input in inputs)
{
Throw.IfNullOrEmpty(input, nameof(input)));
}
}