Esempio n. 1
0
        public static void editServiceEvent(ServiceEvent serviceEvent)
        {
            BasicVehicleDbContext db = new BasicVehicleDbContext();

            db.Entry(serviceEvent).State = EntityState.Modified;
            db.SaveChanges();
        }
Esempio n. 2
0
        public static void editVehicle(Vehicle vehicle)
        {
            BasicVehicleDbContext db = new BasicVehicleDbContext();

            db.Entry(vehicle).State = EntityState.Modified;
            db.SaveChanges();
        }
Esempio n. 3
0
        public static void createServiceEvent(ServiceEvent serviceEvent)
        {
            BasicVehicleDbContext db = new BasicVehicleDbContext();

            db.Entry(serviceEvent).State = EntityState.Added;
            db.ServiceEvents.Add(serviceEvent);
            db.SaveChanges();
        }
Esempio n. 4
0
        public static void deleteServiceEvent(ServiceEvent serviceEvent)
        {
            BasicVehicleDbContext db = new BasicVehicleDbContext();

            db.Entry(serviceEvent).State = EntityState.Deleted;
            db.ServiceEvents.Remove(serviceEvent);
            db.SaveChanges();
        }
Esempio n. 5
0
        public static void createVehicle(Vehicle vehicle)
        {
            BasicVehicleDbContext db = new BasicVehicleDbContext();

            db.Entry(vehicle).State = EntityState.Added;
            db.Vehicles.Add(vehicle);
            db.SaveChanges();
        }
Esempio n. 6
0
        public static void deleteVehicle(Vehicle vehicle)
        {
            BasicVehicleDbContext db = new BasicVehicleDbContext();

            db.Entry(vehicle).State = EntityState.Deleted;
            db.Vehicles.Remove(vehicle);
            db.SaveChanges();
        }