/// <summary> /// Delete method, /// deletes a VehicleModel using VehicleModel Repository. /// </summary> /// <param name="id">VehicleModel Id, type of int.</param> /// <returns>Returns boolean to controller, so controller knows if VehicleModel was deleted or not.</returns> public async Task <Boolean> DeleteVehicleModelAsync(int id) { var entity = await repository.GetVehicleModelAsync(id); if (entity != null) { await repository.DeleteVehicleModelAsync(entity); return(true); } else { return(false); } }
public Task <int> DeleteVehicleModelAsync(Guid id) { return(vehicleModelRepository.DeleteVehicleModelAsync(id)); }
/// <summary> /// REMOVE VEHICLE MODEL /// </summary> /// <param name="vehicleModelDelete"></param> public async Task DeleteVehicleModelAsync(int id) { await _repository.DeleteVehicleModelAsync(id); }