public void AddVehicleType(VehicleType model) { if (_vehicleTypeRepository.GetManay(p => p.VehicleTypeName == model.VehicleTypeName).Any()) { throw new ArgumentException("违章类型已存在"); } _vehicleTypeRepository.Insert(model); _unitofwork.Commit(); }