它與存儲過程數據的所有啓動導致(平紋結構): IdGrandad,GrandadName,IdDad,DadName,IdChild,ChildName 響應應該是嵌套實體列表。 我得到的數據轉換成SqlDataReader的 ......那麼,來這裏的循環: var grandadList = new List<Grandad>();
while (reader.Read())
{
嗨我有一個方法返回列表,但我得到了不想要的結果,請讓我知道在下面的代碼中出了什麼問題。 cmd2.CommandText = "select * from Blogs order by id desc";
SqlDataReader reader = cmd2.ExecuteReader();
List<Blogs> blogslist = new List<Blogs>();
while
我有一個Web服務接收一個列表,在某些情況下,某些列可以爲空,當我嘗試在列表中插入空值時出現錯誤。 「列爲空」。我如何可以在列表中插入NULL值如果某列是空的? dr = cmd.ExecuteReader();
List<ClientData> myList = new List<ClientData>();
while (dr.Read())
{
Cli