我正在尝试使用 sql 和 c# 根据帐户 GUID 检索客户的名称。
static DataClasses1DataContext dbDataClasses = new DataClasses1DataContext();
static void Main(string[] args)
{
var accountList = from accounts in dbDataClasses.ACCOUNTs where accounts.AccountGUID.ToString() = "e8d82d5d-b7bd-4b24-a7fe-ef050921e960"
select accounts;
foreach (ACCOUNT temp in accountList)
{
Console.WriteLine("Account Name: " + temp.Name + " Account GUID: " + temp.AccountGUID);
}
}
但是,我收到一条错误消息“无法将类型 'string' 隐式转换为 'System.guid'
任何帮助,将不胜感激。谢谢