示例#1
0
 public virtual Task <int> Update(IVehicleMakeDTO vehicleMakePoco)
 {
     try
     {
         return(_repository.UpdateAsync(vehicleMakePoco));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
示例#2
0
 public virtual async Task <int> InsertAsync(IVehicleMakeDTO vehicleMakePoco)
 {
     try
     {
         return(await _repository.InsertAsync(vehicleMakePoco));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
示例#3
0
        public virtual async Task <int> InsertAsync(IVehicleMakeDTO vehicleMakePoco)
        {
            try
            {
                var vehicleMake = Mapper.Map <VehicleMake>(vehicleMakePoco);
                await _unitOfWork.AddAsync <VehicleMake>(vehicleMake);

                return(await _unitOfWork.CommitAsync());
            }
            catch (Exception e)
            {
                throw e;
            }
        }
示例#4
0
        public Task <int> UpdateVehicleMakeAsync(IVehicleMakeDTO vehicleMake)
        {
            var vehicle = mapper.Map <VehicleMake>(vehicleMake);

            return(base.UpdateAsync(vehicle));
        }
示例#5
0
 public Task <int> UpdateVehicleMakeAsync(IVehicleMakeDTO vehicleMake)
 {
     return(vehicleMakeRepository.UpdateVehicleMakeAsync(vehicleMake));
 }
示例#6
0
 public Task <int> AddVehicleMakeAsync(IVehicleMakeDTO vehicleMake)
 {
     return(vehicleMakeRepository.AddVehicleMakeAsync(vehicleMake));
 }