今天看到别人的代码使用 Linq 的Distinct进行去重。发现有很多需要注意的地方。实现方式如下:Linq 的Distinct方法需要传递一个自己实现IEqualityComparer的类来作为比较器。 public static class EnumerableExtension ...
分类:
其他好文 时间:
2014-06-15 22:07:35
阅读次数:
307
1、左关联查询var lst = from m in db.信息 join d in db.明细信息 on m.单号 equals d.单号 into mi from dt in mi.DefaultIfEmpty() //dt标示右表 where m.单号 == "2014" && dt.编码.S...
分类:
其他好文 时间:
2014-06-15 21:09:49
阅读次数:
189
select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in (...
分类:
数据库 时间:
2014-06-15 20:39:31
阅读次数:
195
using System;using System.Linq;using System.Linq.Expressions;using System.Data.Objects;namespace HENANLUHENG.Framework.EntityRepository{ public interf...
分类:
其他好文 时间:
2014-06-15 19:53:41
阅读次数:
283
完成的效果图:服务器端代码:using System;using System.Collections.Generic;using System.Linq;using System.ServiceModel;using System.ServiceModel.Description;using Sy...
分类:
其他好文 时间:
2014-06-15 06:54:24
阅读次数:
287
//父窗体using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.T...
刚发现ArcGIS Objects SDK提供了一个代码升级分析工具,用于辅助将程序从9.3升级到10.X:ArcGIS Code Migration Analyzer。 安装sdk后,在vs2010中打开菜单【工具】|【ArcGIS Code Migration Analyzer】,即可调出...
分类:
其他好文 时间:
2014-06-15 00:42:50
阅读次数:
188
using System;using System.Collections.Generic;using System.Linq;using System.Net;using...
分类:
其他好文 时间:
2014-06-14 21:37:08
阅读次数:
262
原文:Sql Server 查看所有存储过程或视图的位置及内容select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id ...
分类:
数据库 时间:
2014-06-14 18:37:31
阅读次数:
222
-- 1. 查看被锁的表
SELECT p.spid, a.serial#, c.object_name, b.session_id, b.oracle_username,b.os_user_name
FROM v$process p, v$session a, v$locked_object b, all_objects c
WHERE p.addr = a.paddr
AND a.p...
分类:
数据库 时间:
2014-06-14 12:55:33
阅读次数:
256