Exemplo n.º 1
0
        public void insertCoach(CoachDTO coachDTO)
        {
            context.user.Add(coachDTO.toUser());
            context.SaveChanges();

            context.coach.Add(coachDTO.toCoach());
            context.SaveChanges();
        }
Exemplo n.º 2
0
        public void insertCoach(CoachDTO coachDTO)
        {
            var userAdded = context.user.Add(coachDTO.toUser());

            context.SaveChanges();
            coachDTO.userId = userAdded.id;

            context.coach.Add(coachDTO.toCoach());
            context.SaveChanges();
        }