Ejemplo n.º 1
0
        public void DeleteMake(int id)
        {
            VehicleMake make = context.VehicleMakers.Find(id);

            if (make != null)
            {
                context.Remove(make);
                context.SaveChanges();
            }
        }
Ejemplo n.º 2
0
        public async Task DeleteVehicle(int vehicleId)
        {
            var foundedVehicle = await GetVehicle(vehicleId);

            if (foundedVehicle != null)
            {
                _vehicleDbContext.Remove(foundedVehicle);
                await _vehicleDbContext.SaveChangesAsync();
            }
        }