I have this Code for Search.
public List<Tbl_Product> ProductSearch(DateTime startdate, DateTime enddate, string productname, int suply)
{
var q = _db.Tbl_Product
.Where(model =>
model.DateReg == startdate &&
model.DateReg == enddate)
.Where(model =>
model.ProductName.Contains(productname))
.Where({});
}
Now I Need to insert this code in Last Where .
if(suply == 1)
{
model.Suply > 0 ;
}
else
{
model.Suply = 0;
}
How should I do it?