C# 在C中从数据库查询枚举值
我的约会数据库将约会ID、状态枚举类型、学生作为列值 这是状态枚举: 我需要查询dbappoints中的行列表,其中Status列设置为“Pending”,并将其传递给列表变量 如何在VisualStudio中使用C语言实现这一点C# 在C中从数据库查询枚举值,c#,mysql,enums,C#,Mysql,Enums,我的约会数据库将约会ID、状态枚举类型、学生作为列值 这是状态枚举: 我需要查询dbappoints中的行列表,其中Status列设置为“Pending”,并将其传递给列表变量 如何在VisualStudio中使用C语言实现这一点 IEnumerable<Appointment> AppQuery = from appointment in _appointmentData.GetAll() wh
IEnumerable<Appointment> AppQuery = from appointment in _appointmentData.GetAll()
where appointment.Status????
select appointment;
注意:_appointmentData.GetAll列出数据库中的整行。取决于数据库中存储的内容,但如何使用。等于:
您是否尝试过where appointment.Status==StatusType.pending数据库中状态的数据类型是什么?
IEnumerable<Appointment> AppQuery = from appointment in _appointmentData.GetAll()
where appointment.Status????
select appointment;
IEnumerable<Appointment> AppQuery = from appointment in _appointmentData.GetAll()
where appointment.Status.Equals(StatusType.Pending)
select appointment;