private static void SaveAction(NegotiationEngine engine, SideConfig side, NegotiationActionType type, String value = "") { NegotiationContainer cont = new NegotiationContainer(); var game = cont.GameSet.Find(engine.NegotiationId); var user = game.Users.First(x => x.Type == side.Type); cont.NegotiationActionSet.Add(new NegotiationAction() { GameId = engine.NegotiationId, Type = type, User = user, RemainingTime = engine.Status.RemainingTime, UserId = user.Id, Value = value }); cont.SaveChanges(); }
private static void SaveAction(NegotiationEngine engine, SideConfig side, NegotiationActionType type, String value = "") { NegotiationContainer cont = new NegotiationContainer(); var game = cont.GameSet.Find(engine.NegotiationId); var user = game.Users.First(x => x.Type == side.Type); cont.NegotiationActionSet.Add(new NegotiationAction() { GameId = engine.NegotiationId, Type = type, User = user, RemainingTime = engine.Status.RemainingTime, UserId = user.Id, Value = value }); cont.SaveChanges(); }