问题描述最近在用LINQ to Entities,看看下面的代码//获取分页数据 var
admins = from aa in db.VAccountAdmins select aa; //处理过滤规则 if (null !=
filterRules) ...
分类:
其他好文 时间:
2014-05-12 16:40:23
阅读次数:
306
ToList()什么时候用?1.当需要对返回的结果进行操作时(比如foreach()操作),可以将这个结果先ToList(),这样可以提高程序运行速度。2.当不需要对结果进行操作时,直接返回IEnumerable对象即可。?:运算符需要返回的结果是Nullable类型的值时怎么办?decimal?
...
分类:
其他好文 时间:
2014-05-09 18:17:48
阅读次数:
265
using System;using System.Collections.Generic;using
System.ComponentModel;using System.Data;using System.Drawing;using
System.IO;using System.Linq;usi...
分类:
其他好文 时间:
2014-05-05 23:22:07
阅读次数:
290
数据库中的数据格式:字段数据类型idintdepartment_pidintdepartment_namenvarchar(20)CREATETABLE[dbo].[T_user_department](
[id] [int] IDENTITY(1,1)NOTNULL, [department_pi...
分类:
其他好文 时间:
2014-05-05 23:21:06
阅读次数:
366
承接上篇博文【LINQ获取树形分类的层数】。在上文中,笔者只分享了层数,在这里我把完整的实现贴出来,欢迎批评指正。先附上效果图:首先是Tree公共类publicclassTree
{publicintModuleID {get;set; }publicintParentID {get;set; }p...
分类:
其他好文 时间:
2014-05-05 23:06:02
阅读次数:
433
用 'top -i' 看看有多少进程处于 Running 状态,可能系统存在内存或 I/O 瓶颈,用 free 看看系统内存使用情况,swap 是否被占用很多,用 iostat 看看 I/O 负载情况...
还有一种办法是 ps -ef | sort -k7 ,将进程按运行时间排序,看哪个进程消耗的cpu时间最多。
top:
主要参数
d:指定更新的间隔,以秒计算。
q:没有任何延迟...
分类:
系统相关 时间:
2014-05-05 13:09:00
阅读次数:
526
首先这种情况出现在应用程序启动前的方法里面。本想通过发射来实现一些功能。谁知道被这个坑了。碰到这种问题。已经相当无语了。同时也不知道该如何解决。望有能之士帮忙解答using
System;using System.IO;using System.Linq;using System.Reflectio...
分类:
Web程序 时间:
2014-05-04 20:24:23
阅读次数:
433
using System;using
System.Collections.Generic;using System.Linq;using System.Text;using
System.Web;using System.Collections.Specialized;namespace NewX...
分类:
Web程序 时间:
2014-05-04 19:04:08
阅读次数:
437
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
us...
分类:
其他好文 时间:
2014-05-04 09:30:21
阅读次数:
360
using System.Collections.Generic;using
System.Collections.Specialized;using System.Linq;using System.Web;using
System.Text;using System.Web.Mvc;using ...
分类:
Web程序 时间:
2014-05-03 23:02:35
阅读次数:
492