private bool IsSpottedInPhoto(Photo photo) { UsrPhotoMeSet upms = new UsrPhotoMeSet( new Query( new And( new Q(UsrPhotoMe.Columns.UsrK, this.K), new Q(UsrPhotoMe.Columns.PhotoK, photo.K) ) ) ); return upms.Count > 0; }
public void UpdatePhotosMeCount(bool update, Transaction transaction) { Query q = new Query(); q.QueryCondition = new Q(UsrPhotoMe.Columns.UsrK, this.K); q.ReturnCountOnly = true; UsrPhotoMeSet upms = new UsrPhotoMeSet(q); if (this.PhotosMeCount != upms.Count) { this.PhotosMeCount = upms.Count; if (update) this.Update(transaction); } }