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); }
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); }
public static void PostFitnessTrainer(FitnessTrainers ft) { try { using (GymDBEntities g = new GymDBEntities()) { g.FitnessTrainers.Add(ft); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }