我正在编写以下代码将SQL转换为LINQ,然后转换为XML:
表的名称是“XMLC”,我想引用它。我该怎么做? 当我直接输入它的名称时,VS会报错。当我说
SqlConnection thisConnection = new SqlConnection(@"Data Source=3BDALLAH-PC;Initial Catalog=XMLC;Integrated Security=True;Pooling=False;");
thisConnection.Open();
XElement eventsGive =
new XElement("data",
from c in ??????
select new XElement("event",
new XAttribute("start", c.start),
new XAttribute("end",c.eend),
new XAttribute("title",c.title),
new XAttribute("Color",c.Color),
new XAttribute("link",c.link)));
Console.WriteLine(eventsGive);
表的名称是“XMLC”,我想引用它。我该怎么做? 当我直接输入它的名称时,VS会报错。当我说
thisConnection.XMLC
时,它也不起作用。