I have an object list like this. Object is type of TBLM_PRODUCT this is the entity framework generated class for my database table TBLM_PRODUCT. My TBLM_PRODUCT class looks like this
public partial class TBLM_PRODUCT
{
public string PRODUCT_CODE { get; set; }
public string PRODUCT_DESC { get; set; }
public string PRODUCT_ISBN { get; set; }
public string PRODUCT_SUPPLIER { get; set; }
public string PRODUCT_PROGROUP { get; set; }
public string PRODUCT_MEDIUM { get; set; }
public Nullable<decimal> PRODUCT_ACTIVE { get; set; }
}
I have declared my list like this. private IEnumerable myList= new List();
I'm getting objects to list like this
myList = RAEntity.TBLM_PRODUCT.ToList<DataControllers.TBLM_PRODUCT>();
I want to query this list to get items which are active. In a normal sql query I can do it like this.
select * from TBLM_PRODUCT where PRODUCT_ACTIVE = 1;
I need to select a list of objects. How can achieve it using a LINQ query?