View Code
 protected IList<String> SelectTitleList()
        {
            using (SamjinDBDataContext db = new SamjinDBDataContext())
            {
                IList<String> returnList = new List<String>();

                var list = from v in db.View_Design_History
                           group v by v.Title into g
                           select new { 
                               // g.key 是 v.Title 值 
                                        Title = g.Key
                            };
                foreach (var item in list)
                {
                    returnList.Add(item.Title);
                }
                return returnList;
            }
        }
posted on 2012-02-03 14:29  吴勇寿  阅读(300)  评论(0编辑  收藏  举报