To create the service, follow these steps:
- Create a new class that will hold our service methods and name it ConVMSVehicleServices.
- The first service will be used to update the Vehicle service group, for which we have a contract and processing class already created (ConVMSVehicleGroupChangeContract, ConWVMVehicleGroupChange) to write this method. Write this method like so:
public void ChangeVehicleGroup(ConVMSVehicleGroupChangeContract _contract) { ConVMSVehicleGroupChange changeGroup = new ConVMSVehicleGroupChange(); changeGroup.Run(_contract); }
This will work, but the consumer will not thank us for the lack of error handling. We could either return a Boolean on success or write a return contract. A return contract ...