Ejemplo n.º 1
0
        public void Add(Business.Recipe business)
        {
            var entity = MapperRecipe.Map(business);

            context.Recipe.Add(entity);
            context.SaveChanges();
        }
Ejemplo n.º 2
0
        public void Add(Business.Scenario business)
        {
            var entity = MapperScenario.Map(business);

            context.Scenario.Add(entity);
            context.SaveChanges();
        }
Ejemplo n.º 3
0
        public void Add(Business.Actions business)
        {
            var entity = MapperActions.Map(business);

            context.Actions.Add(entity);
            context.SaveChanges();
        }
Ejemplo n.º 4
0
        public void Add(Business.People business)
        {
            var entity = MapperPeople.Map(business);

            context.People.Add(entity);
            context.SaveChanges();
        }
Ejemplo n.º 5
0
        public void Add(Business.Compose business)
        {
            var entity = MapperCompose.Map(business);

            context.Compose.Add(entity);
            context.SaveChanges();
        }
Ejemplo n.º 6
0
            protected static void SectionC(ProjetContext appContext)
            {
                Tutor tutorUP = new Tutor();

                tutorUP = appContext.Tutor.Where(s => s.FirstName == "Gary" && s.LastName == "Bilodeau").FirstOrDefault <Tutor>();
                if (tutorUP != null)
                {
                    tutorUP.EmailAddress = "*****@*****.**";
                }
                HelpedStudent hsUP;

                hsUP = appContext.HelpedStudent.Where(hs => hs.FirstName == "Marc" && hs.LastName == "Arsenault").FirstOrDefault <HelpedStudent>();
                TutoringSession TutoringSessionHsUp = appContext.TutoringSession.Where(s => s.Id == hsUP.Id).FirstOrDefault();

                appContext.TutoringSession.Remove(TutoringSessionHsUp);
                appContext.HelpedStudent.Remove(hsUP);
                appContext.SaveChanges();
                HelpedStudent hsUP2;

                hsUP2 = appContext.HelpedStudent.Where(hs => hs.FirstName == "Marc" && hs.LastName == "Arsenault").FirstOrDefault <HelpedStudent>();
                TutoringSession TutoringSessionUP = new TutoringSession();

                TutoringSessionUP = appContext.TutoringSession.Where(ts => ts.Helped.Id == hsUP2.Id).FirstOrDefault <TutoringSession>();
                if (tutorUP != null)
                {
                    TutoringSessionUP.DateSession = new DateTime(2015, 04, 09, 11, 0, 0);
                    TutoringSessionUP.TimeSession = TimeSpan.FromHours(2);
                }
                appContext.SaveChanges();
                HelpedStudent HsJoin = new HelpedStudent();

                HsJoin = appContext.HelpedStudent.Where(hs => hs.FirstName == "Samuel" && hs.LastName == "Vachon").FirstOrDefault <HelpedStudent>();
                Tutor TutorJoin = new Tutor();

                TutorJoin = appContext.Tutor.Where(hs => hs.FirstName == "Louis" && hs.LastName == "Vézina").FirstOrDefault <Tutor>();

                TutoringSession newTutoringSession = new TutoringSession();

                newTutoringSession.DateSession   = new DateTime(2015, 06, 04, 10, 0, 0);
                newTutoringSession.TimeSession   = TimeSpan.FromHours(10);
                newTutoringSession.LengthSession = TimeSpan.FromHours(2);
                newTutoringSession.HelpedId      = HsJoin;
                newTutoringSession.TutorId       = TutorJoin;

                appContext.TutoringSession.Add(newTutoringSession);
                appContext.SaveChanges();
            }
 public void add(NatureColis type_)
 {
     bd.Nuturecolis.Add(type_);
     bd.SaveChanges();
 }
 public void add(VoieTransmission type_)
 {
     bd.Voietransmission.Add(type_);
     bd.SaveChanges();
 }
 public void add(Ville type_)
 {
     bd.Ville.Add(type_);
     bd.SaveChanges();
 }
 public void add(TypeEmploye type_)
 {
     bd.TypeEmploye.Add(type_);
     bd.SaveChanges();
 }
 public void add(TypeColis type_)
 {
     bd.Typecolis.Add(type_);
     bd.SaveChanges();
 }
Ejemplo n.º 12
0
 public void add(Colis type_)
 {
     bd.Colis.Add(type_);
     bd.SaveChanges();
 }
 public void add(Client type_)
 {
     bd.Client.Add(type_);
     bd.SaveChanges();
 }