I have a model that looks like this
[Column("StatusId")]
public FileStatus Status { get; set; }
public int Id { get; set; }
I also have an enum that looks like this.
public enum FileStatus
{
MessageInProgress,
MessageDone,
NoMessage
}
I am pulling data from my repository to populate data variable below
IEnumerable<MyFile> data = await _fileDataRepository.GetAllData(Id);
I want to filter data such that I will remove any record that has a status of MessageDone or NoMessage.
This code does not work for me.
data.where( x => x.Status != "MessageDone" | x.Status != "NoMessage")
How do I achieve the filtering?