public void RemoveFromEvent(long donorId, long eventId, ref IAuctionTransaction trans) { using (var records = new AuctionEventDonorCollection()) { var filter = new PredicateExpression { AuctionEventDonorFields.DonorId == donorId }; filter.AddWithAnd(AuctionEventDonorFields.EventId == eventId); records.DeleteMulti(filter); } }
public IList<long> GetEventListByDonor(long donorId, ref IAuctionTransaction trans) { using (var records = new AuctionEventDonorCollection()) { var filter = new PredicateExpression(AuctionEventDonorFields.DonorId == donorId); if (trans != null) { trans.Add(records); } records.GetMulti(filter); return records.ToList().Select(r => r.EventId).ToList(); } }
public void RemoveFromAllEvents(long donorId, ref IAuctionTransaction trans) { using(var records = new AuctionEventDonorCollection()) { var filter = new PredicateExpression {AuctionEventDonorFields.DonorId == donorId}; records.DeleteMulti(filter); } }