Exemplo n.º 1
0
        public static Dal.FitnessTrainers PostFitnessTrainer(ClassFitnessTrainers ft)
        {
            Dal.FitnessTrainers f = new Dal.FitnessTrainers()
            {
                guide_id  = ft.guide_id,
                specialty = ft.specialty,
                phone_num = ft.phone_num,
                email     = ft.email,
                name      = ft.name
            };

            return(f);
        }
Exemplo n.º 2
0
        public static ClassFitnessTrainers GetDtoFitnessTrainer(Dal.FitnessTrainers ft)
        {
            ClassFitnessTrainers fit = new ClassFitnessTrainers()
            {
                guide_id  = ft.guide_id,
                specialty = ft.specialty,
                phone_num = ft.phone_num,
                email     = ft.email,
                name      = ft.name
            };

            return(fit);
        }
Exemplo n.º 3
0
 public static void PostFitnessTrainer(FitnessTrainers ft)
 {
     try
     {
         using (GymDBEntities g = new GymDBEntities())
         {
             g.FitnessTrainers.Add(ft);
             g.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }