日期:2014-05-20 浏览次数:21202 次
List<TmpClCldocInfo> list1 = new List<TmpClCldocInfo>() { new TmpClCldocInfo() { UNIT_ID = "1", DOC_NUM = "1" }, new TmpClCldocInfo() { UNIT_ID = "2", DOC_NUM = "2" } };
List<TmpClCldocInfo> list2 = new List<TmpClCldocInfo>() { new TmpClCldocInfo() { UNIT_ID = "1", DOC_NUM = "1" }, new TmpClCldocInfo() { UNIT_ID = "2", DOC_NUM = "2" }, new TmpClCldocInfo() { UNIT_ID = "3", DOC_NUM = "3" } };
var infos = from p in context.Infos.ToList() select p;
var temp = infos.Where(p => p.Sex == true).ToList();
temp.Add(new Info
{
Code = "p100",
Name = "哈哈",
Sex = false,
Nation = "n004",
Birthday = DateTime.Now
});
var q = infos.Except(temp);
var q = (from p in infos select p).Except(from m in temp select m);