I have a string that is being passed to my controller in Razor Pages. This string contains the name of one of 8 possible Booleans as selected by the user. I am attempting to use this Boolean Name in a SQL server query as shown below.
try
{
var test = await _context.GuestModel
.Include(r => r.PatientModel)
.OrderByDescending(r => r.GuestLastName)
.Where(r => r.booleanName == true)
.ToListAsync();
return test;
}
booleanName is the string containing the Boolean Name I need to use, but so far I have not been able to access that information successfully.