public bool AddCar(int companyId, Vehicles entity) { try { bool isSuccess; CompanyRepository repo = new CompanyRepository(); int result = repo.AddCarToCompany(companyId, entity); _ = result == 1 ? isSuccess = true : isSuccess = false; return(isSuccess); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("BusinessLogic::CompanyBusiness::AddCar::Error occured.", ex); } }