首先我们看下where的方法,直接查看定义(定义如下),其实一种是对IEnumerable的扩展,一种是对IQueryable的扩展,直接看最常用的,其实区别就在IEnumerable的扩展的参数是系统定义的委托FuncIQueryable的参数则是表达式Expression>,1。IEnume.....
分类:
其他好文 时间:
2014-06-16 11:05:23
阅读次数:
214
1.JSON序列化string JsonStr=
JsonConvert.SerializeObject(Entity);eg:A a=new A();a.Name="Elain00";a.Hobby="eat
eat";string jsonStr=JsonConvert.SerializeObj...
分类:
Web程序 时间:
2014-06-16 09:20:33
阅读次数:
259
现在有一个小需求就是对一个xml中的conditionusing System;using
System.Collections.Generic;using System.Linq;using System.Text;using
Microsoft.JScript;namespace TestX.....
分类:
其他好文 时间:
2014-06-16 07:12:36
阅读次数:
204
详细错误堆栈信息:org.hibernate.HibernateException: A
collection with cascade="all-delete-orphan" was no longer referenced by the
owning entity instance: xx.xx...
分类:
系统相关 时间:
2014-06-16 07:01:08
阅读次数:
823
1、infrom p in 信息where (new string[]
{"10","14"}).Contains(p.编码)select p2、not infrom p in 信息where !(new string[]
{"10","14"}).Contains(p.编码)select p
分类:
其他好文 时间:
2014-06-13 19:39:29
阅读次数:
251
LINQ to
SQL语句(1)之WhereWhere操作适用场景:实现过滤,查询等功能。说明:与SQL命令中的Where作用相似,都是起到范围限定也就是过滤作用的,而判断条件就是它后面所接的子句。Where操作包括3种形式,分别为简单形式、关系条件形式、First()形式。下面分别用实例举例下:1...
分类:
数据库 时间:
2014-06-13 19:04:32
阅读次数:
348
2014-06-12 BaoXinjian一、摘要(本文大部分内容来源于Tony Liu)1.
在Update数据之前,我们往往要对待更新的记录进行有效性的校验,校验级别包括Attribute Level Validation: 字段级的校验Entity
Level Validation: 记录级的...
分类:
其他好文 时间:
2014-06-13 16:33:40
阅读次数:
302
1 using System; 2 using
System.Collections.Generic; 3 using System.Linq; 4 using System.Collections; 5 6
namespace Demo1 7 { 8 class Program 9 ...
分类:
其他好文 时间:
2014-06-13 15:00:27
阅读次数:
241
1 using System; 2 using System.Collections.Generic;
3 using System.Linq; 4 using System.Text; 5 6 namespace 委托实现事件1 7 { 8 class
Program 9 {1...
分类:
其他好文 时间:
2014-06-13 14:58:21
阅读次数:
208
1 using System; 2 using System.Collections.Generic;
3 using System.Linq; 4 using System.Text; 5 6 namespace 委托练习 7 { 8 class Program
9 {10 ...
分类:
其他好文 时间:
2014-06-13 14:50:06
阅读次数:
244