public ActionResult rejectreq(int idbh = 0) { BiddingProperty rt = db.BiddingProperties.Find(idbh);//this checks only the primary key BidRejected hj = new BidRejected(); hj.BidId = rt.BiddingId; hj.ClientId = rt.ClientId; hj.PropertyId = rt.PropertyId; ViewBag.teme = rt.PropertyId; db.BidRejecteds.Add(hj); db.BiddingProperties.Remove(rt); db.SaveChanges(); ViewBag.message = "the record has been rejected"; return(RedirectToAction("Index")); }
void Apply(BidRejected @event) { _bids.Remove(new BidInfo { BidId = @event.BidId }); }