Пример #1
0
 public EntryExerciseJoin Save(EntryExerciseJoin entryExerciseJoin)
 {
     Console.WriteLine(entryExerciseJoin);
     db.EntryExerciseJoins.Add(entryExerciseJoin);
     db.SaveChanges();
     return(entryExerciseJoin);
 }
Пример #2
0
        public IActionResult AddExercise(int entryId, int exerciseId, int sets, int reps, int weight)
        {
            EntryExerciseJoin newJoin = new EntryExerciseJoin {
                EntryId = entryId, ExerciseId = exerciseId, Sets = sets, Reps = reps, Weight = weight
            };

            entryRepo.Save(newJoin);
            return(Json(newJoin));
        }