gpt4 book ai didi

c# - SQL 查询到 Lambda C#

转载 作者:行者123 更新时间:2023-11-29 22:26:06 25 4
gpt4 key购买 nike

此 SQL 查询的 Lambda 语句是什么?

update Table_Name
set Column_Name = REPLACE(REPLACE(Column_Name, CHAR(13), ' '), CHAR(10), ' ')

我已经尝试过:

ExporttoExcel ete = new ExporttoExcel(); 
if (ete.BillingNotes != null)
{
ete.BillingNotes = ete.BillingNotes.Replace("\r", " ");
ete.BillingNotes = ete.BillingNotes.Replace("\n", " ");
}
a.SubmitChanges();

谢谢!

还是没有运气。有人吗?

最佳答案

这只是示例:

var tb = db.Table_Name.SingleOrDefault(x=>x.Id == 1);
if(tb != null)
tb.Column_Name = tb.Column_Name.Replace("\\r","").Replace("\\n","");
db.SaveChanges();

关于c# - SQL 查询到 Lambda C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30251905/

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