public void MakeBid(Guid serviceId, decimal bidValue) { User user = _serviceHubEntities.Users.SingleOrDefault(o => o.AspNetUserId == _aspNetUserId); Bid bid = new Bid { Amount = bidValue, IsCancelled = false, ServiceId = serviceId, TimeStamp = DateTime.Now }; user.Bids.Add(bid); }
public void MakeBid(Guid serviceId, decimal bidValue) { int userProfileId = WebSecurity.CurrentUserId; User user = _serviceHubEntities.Users.SingleOrDefault(o => o.UserProfileId == userProfileId); Bid bid = new Bid { Amount = bidValue, IsCancelled = false, ServiceId = serviceId, TimeStamp = DateTime.Now }; user.Bids.Add(bid); }