public Exercise(Strength.DB.Models.Exercise e) { Id = e.Id; Name = e.Name; SetsAmount = e.SetsAmount; Day = e.Day.Id; Program = e.Program.Id; }
//----------------------------------------------------------------------------------------------------------------------- // used for creating a exercise, hardcoded private void CreateInitialExercise(Strength.DB.Models.Day day, string name) { Strength.DB.Models.Exercise exer = new Strength.DB.Models.Exercise(); exer.Name = name; exer.Day = day; exer.Program = day.Program; // hardcoded amount of sets in each exercise, feel free to change exer.SetsAmount = 3; _context.Exercises.Add(exer); _context.SaveChanges(); }