public void DeleteMake(int id) { VehicleMake make = context.VehicleMakers.Find(id); if (make != null) { context.Remove(make); context.SaveChanges(); } }
public async Task DeleteVehicle(int vehicleId) { var foundedVehicle = await GetVehicle(vehicleId); if (foundedVehicle != null) { _vehicleDbContext.Remove(foundedVehicle); await _vehicleDbContext.SaveChangesAsync(); } }