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

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

            db.Entry(vehicle).State = EntityState.Modified;
            db.SaveChanges();
        }
Exemplo 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();
        }
Exemplo 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();
        }
Exemplo 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();
        }
Exemplo 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();
        }