Пример #1
0
        public void AddExercise(string exerciseName)
        {
            _identityContext.Exercises.Add(new Exercise()
            {
                ExName = exerciseName
            });

            _identityContext.SaveChanges();
        }
Пример #2
0
        public void LogWorkoutSet(List <LogExerciseModel> workoutSet)
        {
            foreach (LogExerciseModel workoutRow in workoutSet)
            {
                _identityContext.Workouts.Add(new Workout()
                {
                    WoUserID     = workoutRow.WoUserID,
                    WoExID       = workoutRow.WoExID,
                    WoRepCount   = workoutRow.WoRepCount,
                    WoSetCount   = workoutRow.WoSetCount,
                    WoWeightUsed = workoutRow.WoWeightUsed,
                    WoDate       = DateTime.Parse(workoutRow.WoDate)
                });
            }

            _identityContext.SaveChanges();
        }
Пример #3
0
        public ActionResult DeleteConfirmed(string id)
        {
            ApplicationUser applicationUser = db.Users.Find(id);

            db.Users.Remove(applicationUser);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }