public void TestBindingService() { string qrcode = "http://192.168.1.101:8080/qrcode-manage/0"; string distributorName = "河北"; string productName = "咳咳音乐"; QrCodeModel qrcodeModel = qrcodeService.FindById(qrcode); DistributorModel distributorModel = distributorService.FindById(distributorName); ProductModel productModel = productService.FindById(productName); qrcodeModel.Distributor = distributorModel; qrcodeModel.Product = productModel; qrcodeService.Add(qrcodeModel); }