Implementing Search method For a Class
public IEnumerable&lt;ProductCardRowViewModel&gt; Search()
{
    GenericRepository&lt;Rows&gt; repo = new GenericRepository&lt;Rows&gt;();
    var temp = repo.GetAll();

    if (this.Warehouse != 0)
        temp = temp.Where(x =&gt; x.Head.Warehouse == this.Warehouse );
    if (ProductCode &gt; 0)
        temp = temp.Where(x =&gt; x.ProductCode == this.ProductCode );
    if (!string.IsNullOrEmpty(this.UnitCode))
        temp = temp.Where(x =&gt; x.UnitCode .Equals(this.UnitCode));

    List&lt;ProductCardRowViewModel&gt; data = new List&lt;ProductCardRowViewModel&gt;();

    foreach (Rows row in temp)
        data.Add(new ProductCardRowViewModel(row));

    return data;
}  




omitting braces {} in places where they are optional is bad practice and leads to error prone code.  
in its current state this method is returning for Warehouse == 0, ProductCode == 0 and for instance UnitCode == string.Empty all items. If this is what you want then IMO a comment should describe this behaviour.  
you are sometimes using this and sometimes you don't. Choose one style and stick to it.  
I would add a ToList() to temp in the loop. And by the way temp is a really bad name.  
instead of building the returned value as a List&lt;T&gt; you could simply use yield return. If you want to keep the List you should at least use var.


Applying the mentioned points would lead to  

public IEnumerable&lt;ProductCardRowViewModel&gt; Search()
{
    GenericRepository&lt;Rows&gt; repo = new GenericRepository&lt;Rows&gt;();
    var rows = repo.GetAll();

    if (this.Warehouse != 0)
    {
        rows = rows.Where(x =&gt; x.Head.Warehouse == this.Warehouse );
    }

    if (this.ProductCode &gt; 0)
    {
        rows = rows.Where(x =&gt; x.ProductCode == this.ProductCode );
    }

    if (!string.IsNullOrEmpty(this.UnitCode))
    {
        rows = rows.Where(x =&gt; x.UnitCode.Equals(this.UnitCode));
    }

    foreach (Rows row in rows.ToList())
    {
        yield return new ProductCardRowViewModel(row);
    }
}