public async Task <bool> CreateVehicleModel(VehicleModel vehicleModel) { if (!ValidateVehicleModel(vehicleModel)) { return(false); } bool res = await _vehicleRepository.CreateVehicleModel(vehicleModel); return(res); }
public async Task <bool> CreateVehicleModel(VehicleModel vehicleModelToInsert) { // Validation logic if (!ValidateVehicleModel(vehicleModelToInsert)) { return(false); } // Database logic bool result = await _vehicleModelRepository.CreateVehicleModel(vehicleModelToInsert); return(result); }