I have object of search-model in cache (i saved him from get-query) and i get with get-request other object same model.

I want to compare these objects, but if i don't change parametrs, anyway i have "false" result in this code:

public class SearchO
{
  public  List<SellsLive> Data;
  public SellsLiveSearch Query;
}


    [HttpGet]
    public ActionResult Result(SellsLiveSearch ObjectModelFromQuery, string Ser)
    {           
                if (System.Web.HttpContext.Current.Cache[Ser] != null)
                        {SearchO ObjectModelFromCache = (SearchO)System.Web.HttpContext.Current.Cache[Ser];
                         if(ObjectModelFromCache.Query==ObjectModelFromQuery)
 ...
    }

Why this can happen?

Related posts

Recent Viewed