EntityFramework4.1和ADO.NET插入操作性能比较

插入实体的字段:

var data = new Comments();
data.ArticleId = 1;
data.AuditStatus = 2;
data.Company = 5;
data.Content = "测试";
data.CreateTime = DateTime.Now;
data.IP = "192.168.1.2";
data.NickName = "张三";
data.ReplyContent = string.Empty;
data.ReplyId = 0;
data.ReplyNickName = string.Empty;
data.ReplyTime = DateTime.Now;
data.Tel = "887964645";
data.UserId = 10;

 

插入1000条分别消耗的时间:

ADO.NET:

EF:

posted @ 2011-09-28 16:40  ahui  阅读(435)  评论(1编辑  收藏  举报