public OperationResult AddCar(AddCarDto addCarDto) { addCarDto.CarLocation = ToLowerCaseString(addCarDto.CarLocation); addCarDto.LocationId = LocationRepository.GetLocationId(addCarDto.CarLocation); if (addCarDto.LocationId == null) { return(new OperationResult(false, "Şehir Bulunamadı", (int)HttpStatusCode.NotFound)); } var car = CreateCar(addCarDto); CarRepository.AddAndSave(car); return(new OperationResult(true, "Araç Eklendi id=" + car.Id, (int)HttpStatusCode.OK)); }