Equal is not defined between type Nullable and Int32

前端 未结 2 1173
终归单人心
终归单人心 2021-01-27 03:46

I am writing a boring application to manage patients and their clinic history. I used SQLite combined with DbLinq libraries and DbMetal code generation utility. Here are two cla

2条回答
  •  有刺的猬
    2021-01-27 04:34

    Did you try: address.Patient = currentPatient instead of: currentPatient.Addresses.Add(address)?

    PatientAddress address = new PatientAddress();
    address.Address = txtAddress.Text;
    address.DomicileStatus = cmbDomicileStatus.Text;
    address.Patient = currentPatient;
    
    Database.Source.PatientsAddresses.InsertOnSubmit(address);
    Database.Source.SubmitChanges();
    

提交回复
热议问题