什么是延迟加载:所谓延迟加载就是当在真正需要数据的时候,才真正执行数据加载操作。可以简单理解为,只有在使用的时候,才会发出sql语句进行查询,数据是分N次读取。什么是立即加载:所谓立即加载既是所有的相关数据一次被读取出来,而不是分N次。相信上面的概念大家都知道,接下来举个例子说明一下:ClassIn...
分类:
其他好文 时间:
2014-09-04 23:29:41
阅读次数:
269
0.并发冲突的示例单用户的系统现在应该比较罕见了,一般系统都会有很多用户在同时进行操作;在多用户系统中,涉及到的一个普遍问题:当多个用户“同时”更新(修改或者删除)同一条记录时,该如何更新呢?下图展示了开放式并发冲突的一个示例:假设数据库中有一条记录Record{Field1=5,Field2=6,...
分类:
数据库 时间:
2014-09-04 22:02:40
阅读次数:
248
之前写过两篇关于异步编程的文章,详细可以进入C#~异步编程和C#~异步编程在项目中的使用.net的各个版本都有自己主推的技术,像.NET1.1中的委托,.NET2.0中的泛型,.NET3.0中的Linq,.NET4.0中的Dynimac,而在.NET4.5中主要推出的是异步编程,而实现异步编程的简单...
分类:
Web程序 时间:
2014-09-04 14:36:29
阅读次数:
235
文件同步的完整代码using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using Syst...
分类:
其他好文 时间:
2014-09-04 10:27:29
阅读次数:
176
完整代码using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Te...
分类:
其他好文 时间:
2014-09-04 10:26:59
阅读次数:
456
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.SqlClient; namespac...
分类:
数据库 时间:
2014-09-04 09:40:37
阅读次数:
311
HashSet<T>不重复的无序列表SortedSet<T>不重复的有序列表usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceConsoleApplication8
{
classProgram
{
staticvoidMain(string[]args)
{
//..
分类:
其他好文 时间:
2014-09-04 03:03:08
阅读次数:
143
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Collections.ObjectModel;
namespaceConsoleApplication2
{
classProgram
{
staticvoidMain(string[]args)
{
//可观察的集合
ObservableCollect..
分类:
其他好文 时间:
2014-09-04 03:00:58
阅读次数:
154
using System;using System.Collections.Generic;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Text;using System.Threading...
分类:
数据库 时间:
2014-09-04 00:00:06
阅读次数:
322