gpt4 book ai didi

c# - 使用外部 SQL Server 2008 R2 更新 linq 中的语句

转载 作者:太空宇宙 更新时间:2023-11-03 10:59:45 24 4
gpt4 key购买 nike

<分区>

我在通过 linq 更新表时遇到问题。

我为它执行下面的代码

    tbl_Customer tblcust= new tbl_Customer();
tbl_Customer tcust = obj.tbl_Customers.Single(c => c.C_ID == 1);
tblcust.C_Name = txtcname.Text;
tblcust.C_Address = txtcaddress.Text;
tblcust.C_Mobile =Convert.ToInt64( txtcmobile.Text);
obj.SubmitChanges();

但是这段代码不影响表中的记录。我使用外部 SQL Server 连接数据库,帮助我解决这个问题。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com