close

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TEST
{
    class Program
    {
        static void Main(string[] args)
        {
            ApartmentDataContext myContext = new ApartmentDataContext();
            var myQuery = from c in myContext.apartments
                          select c;
            foreach (var item in myQuery)
            {               
                Console.WriteLine(item.AptName);

                foreach (var subitem in item.reviews)
             {
                    Console.WriteLine("{0} {1} {2}",item.AptName,subitem.Rate,subitem.Comments);
             }               

            }
            Console.ReadLine();

        }
    }
}

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 chilliwack425 的頭像
    chilliwack425

    無聊的部落格

    chilliwack425 發表在 痞客邦 留言(0) 人氣()