Entity Framework、SQL、および C# を使用しています。
私はClientと呼ばれるテーブルとclients_phoneと呼ばれるテーブルを持っています。
Xtragrid を含むフォームがあり、BindingSource を使用して IQueryable をグリッドにバインドします。
myBindingSource = new BindingSource();
myBindingSource.DataSource = clients; //Clients it is the IQueryable<Client>
myBindingSource.DataMember = "clients_phone";
myBindingSource.AllowNew = true;
次に、クライアントに新しい client_phone を追加したいと思います。これを行うには、New Client() を作成し、電話を追加します。
clients newclient = objContext.CreateObject<clients>();
newclient.clients_phone = newClients_Phone;
objContext.AddObject("Clients", newclient);
最後に、ObjectContext に新しい client_phone を追加しましたが、Xtrag の client_phone が表示されません。
何が起こるかのアイデアはありますか??。
ありがとう