public void SaveFirstForm(string RNA, string IBAN, string nom_association) { association Asso = new association() { RNA = RNA, IBAN = IBAN, nom_association = nom_association }; CprojBdd.associations.Add(Asso); CprojBdd.SaveChanges(); }
public int CreerAssociation(string nom_association, string RNA, string IBAN) { association Asso = new association() { nom_association = nom_association, RNA = RNA, IBAN = IBAN }; CprojBdd.associations.Add(Asso); CprojBdd.SaveChanges(); return(Asso.id_association); }
public void TestCreateAssociation(string RNA, string IBAN, string nom_association) { association AssociationTrouve = CprojBdd.associations.FirstOrDefault(association => association.nom_association == nom_association); if (AssociationTrouve == null) { CreerAssociation(RNA, IBAN, nom_association); } /* if (AssociationTrouve != null) * { * * }*/ }