小编use*_*246的帖子

如何使用具有不同类的多个属性的linq`Exce`?

我试图学习Linq/Lambda表达式并被困在某个地方.

我在做什么

我创建了两个具有属性的类,其中包含一些常见属性.这些类就像(它的测试代码).

class TestA
    {
        public int Id { get; set; }
        public int ProductID { get; set; }
        public string Category { get; set; }

        public TestA(int id, int procid, string category)
        {
            this.Id = id;
            this.ProductID = procid;
            this.Category = category;
        }
    }

    class TestB
    {
        public int ProductID { get; set; }
        public string Category { get; set; }

        public TestB(int procid, string category)
        {
            this.ProductID = procid;
            this.Category = category;
        }
    }
Run Code Online (Sandbox Code Playgroud)

然后我为他们创建了两个列表, …

c# linq iequalitycomparer except

5
推荐指数
1
解决办法
9679
查看次数

如何在SQL Server中使用rownumber获取匹配数据?

我是SQL Server的新手,我不知道怎么说这个问题.我觉得这可能会重演.如果您知道,请将其标记为重复.我将用数据解释我想要实现的目标

表数据 - sometable

ID  TKID    Status    DateTimeStamp            RunMin
-----------------------------------------------------
215  6      Start   2009-10-29 09:48:14.243    NULL
261  6      Stop    2009-10-30 10:05:16.460    1457
356  6      Start   2009-11-03 14:11:05.097    NULL
357  6      Stop    2009-11-03 15:20:05.133    1526
358  6      Start   2009-11-03 16:14:45.863    NULL
574  19     Start   2009-11-12 13:12:11.827    NULL
575  19     Stop    2009-11-12 13:47:23.077    35
543 259     Start   2009-11-12 09:01:24.013    NULL 
620 259     Stop    2009-11-14 11:25:30.177    NULL 
623 259     Start   2009-11-14 16:47:32.913    NULL 
720 352     Start   2009-11-18 17:47:38.637    NULL 
730 352     Stop …
Run Code Online (Sandbox Code Playgroud)

sql sql-server sql-server-2008-r2

3
推荐指数
1
解决办法
107
查看次数