????EntityFramework???????????? ?????????????????2???????? ???????????????  ....
?????????????????
1         public static IM_CallRecord GetEFData()
2         {
3             using (ModelContainer mv = new ModelContainer())
4             {
5                 return (from c in mv.IM_CallRecord where c.id == 12356 select c).SingleOrDefault<IM_CallRecord>();
6             }
7         }
8
9         static void Main(string[] args)
10         {
11             Console.WriteLine("??230????????????????");
12             //=================????SQL===================
13             var beginTime = DateTime.Now;
14             com.infusionmanage.model.impl.IM_CallRecordDAOImpl im = new com.infusionmanage.model.impl.IM_CallRecordDAOImpl();
15             im.findByPage(12356?? 1);
16             var endTime = DateTime.Now;
17             Console.WriteLine("---????SQL----???:" + (beginTime - endTime).ToString());
18
19             //=================EF???=====================
20             beginTime = DateTime.Now;
21             GetEFData();
22             endTime = DateTime.Now;
23             Console.WriteLine("??EF??????κ??:" + (beginTime - endTime).ToString());
24
25             beginTime = DateTime.Now;
26             GetEFData();
27             endTime = DateTime.Now;
28             Console.WriteLine("??EF??????κ??:" + (beginTime - endTime).ToString());
29
30             Console.ReadKey();
31         }
????????????

??????????????????EntityFramework??????????????????????????
????· All -in-1????????????????д?????? ???????????????
????· ??????????????????????貼????????????
????· ??LINQ???????????????????????????????SQL??
????· EF????????????????????OData Service??????????
????????????£??????????EF??:
????· ?????????????
????· ???????洢???????????? EF??????????????????Change???????????洢??????.?????EF????洢???????????????
????· ????????????Insert????  ????EF??????????Bulk ????
????· ??????2????????μ?????????????У???????????
???????磺UPDATE ???? SET ColumA = 10 Where ColumnB =??
??????????2????????????ExecuteNonQuery??????Context???????????Ado.Net????
????· ????????????????????? EF?????????????????????????????????????????????淶????
????· ??????з??????????? ??????????????м??.