예제 #1
0
        /// <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);
            }
        }
예제 #2
0
 public Task <int> DeleteVehicleModelAsync(Guid id)
 {
     return(vehicleModelRepository.DeleteVehicleModelAsync(id));
 }
예제 #3
0
 /// <summary>
 /// REMOVE VEHICLE MODEL
 /// </summary>
 /// <param name="vehicleModelDelete"></param>
 public async Task DeleteVehicleModelAsync(int id)
 {
     await _repository.DeleteVehicleModelAsync(id);
 }