首页 | 本学科首页   官方微博 | 高级检索  
     

Entity Framework数据访问性能优化的几种方法
引用本文:陈永松. Entity Framework数据访问性能优化的几种方法[J]. 电脑开发与应用, 2014, 0(7): 71-73
作者姓名:陈永松
作者单位:广东松山职业技术学院计算机系,广东韶关512126
摘    要:Entity Framework一般通过LINQ代码或lambda表达式自动生成SQL语句,开发效率很高,然而使用时如果不注意会引来性能问题。通过对不同方法使用Entity Framework进行比较,提出Entity Framework数据访问性能优化的几种方法,包括更新数据时使用无跟踪查询、通过附加数据修改和删除数据、合理使用ToList()和FirstOrDefault()、合理使用预先加载。经过性能测试,这些方法是有效的。

关 键 词:Entity Framework  生成SQL  性能优化  性能测试

Several Methods of Entity Framework Data Access Performance Optimization
CHEN Yong-song. Several Methods of Entity Framework Data Access Performance Optimization[J]. Computer Development & Applications, 2014, 0(7): 71-73
Authors:CHEN Yong-song
Affiliation:CHEN Yong-song;(Department of Computer,Guangdong Songshan Polytechnic College; Shaoguan512126,China)
Abstract:Entity Framework by the LINQ code or lambda expression to automatically generate SQL statements,the development efficiency is very high,but if not pay attention when used will lead to performance problems.Through the comparison of different methods using Entity Framework,and several methods are put forward to optimize Entity Framework data access performance,including the updating of data without the use of additional data tracking,by Attachment data to modify and delete data,reasonable use ToList() and FirstOrDefault(),the rational use of pre loading.Through the performance test,the method is effective.
Keywords:Entity Framework  cenerate SQL  performance optimization  performance test
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号