Esempio n. 1
0
        public void CreateTrain(Train train)
        {
            TicketsContextXML ctx = new TicketsContextXML();

            ctx.Trains.ToList().Add(train);
            ctx.Save();
        }
Esempio n. 2
0
        public void DeleteTrain(Train train)

        {
            TicketsContextXML ctx = new TicketsContextXML();

            ctx.Trains.Remove(train);
            ctx.Save();
        }