Example #1
0
 public void CreateStep(int idGame, int xStep, int yStep, int player)
 {
     Step newStep = new Step
     {
         IdGame = idGame,
         Player = player,
         XStep = xStep,
         YStep = yStep
     };
     SaveStep(newStep);
 }
Example #2
0
 private void SaveStep(Step newStep)
 {
     if (newStep.Id == 0)
         context.Steps.Add(newStep);
     else
         context.Entry(newStep).State = EntityState.Modified;
     context.SaveChanges();
 }