Marius Vasile

Marius Vasile

  • 590
  • 1.9k
  • 146.3k

asp.net razor check if a list contain a string

Dec 2 2020 1:22 AM
I have a model
 
  1. public class IsoRemoval  
  2.     {  
  3.         [Key]  
  4.         public int IdIR { getset; }  
  5.         public DateTime IsoRemDate { getset; }  
  6.         public string Equipment { getset; }  
  7.         public string IsoRemMethod { getset; }  
  8.         public int RemovedBy { getset; }  
  9.         public int VerifiedBy { getset; }  
  10.     }  
string Equipment may contain "Motor", "Pump" or "Compressor"
 
How do I verify in the saved data if under Equipment there is any "Compressor"? 

Answers (8)