My Appointment database has Appointment ID, Status(enum type), Student as column values.
This is the Status enum:
public enum StatusType
{
Pending,
Approved,
Cancelled
}
I need to query the list of rows in the db(appointments) where Status column is set to 'Pending' and pass it to a list variable.
How do I do that in Visual Studio using C#?
IEnumerable<Appointment> AppQuery = from appointment in _appointmentData.GetAll()
where appointment.Status????
select appointment;
Note: _appointmentData.GetAll() lists the entire rows in the db.
where appointment.Status == StatusType.Pending