public bool DeleteCar(int CarId,CarEntity DeleteCarDetails) { try { _unitOfWork.CarRepository.Delete(Mapper.Map<Car>(DeleteCarDetails)); _unitOfWork.Save(); return true; } catch (Exception ex) { logger.Error(ex); return false; } }
public bool CreateCar(CarEntity CarDetails) { try { var a = Mapper.Map<Car>(CarDetails); _unitOfWork.CarRepository.Insert(a); _unitOfWork.Save(); return true; } catch (Exception ex) { logger.Error(ex); return false; } }