public ReferrerSearchQuery GetReferrerSearchQuery(ISession session) { ReferrerSearchQuery rsq = null; if (Id == 0) { rsq = (ReferrerSearchQuery)session.CreateCriteria(typeof(ReferrerSearchQuery)) .Add(Expression.Eq("SearchQuery", SearchQuery)) .UniqueResult(); if (rsq == null) { rsq = new ReferrerSearchQuery(); rsq.RequestCount = RequestCount; } else { rsq.RequestCount += RequestCount; } } else { rsq = (ReferrerSearchQuery)session.Load(typeof(ReferrerSearchQuery), Id); rsq.RequestCount = RequestCount; } rsq.SearchQuery = SearchQuery; return rsq; }
public TransitReferrerSearchQuery(DBlog.Data.ReferrerSearchQuery o) : base(o.Id) { SearchQuery = o.SearchQuery; RequestCount = o.RequestCount; }
public ReferrerSearchQueryTest() { mReferrerSearchQuery = new ReferrerSearchQuery(); mReferrerSearchQuery.RequestCount = 10; mReferrerSearchQuery.SearchQuery = Guid.NewGuid().ToString(); }