Linq To Sql vs Entity Framework Performance

前端 未结 3 1067
逝去的感伤
逝去的感伤 2020-12-09 10:15

I have been searching for recent performance benchmarks that compare L2S and EF and couldnt find any that tested calling stored procedures using the released version of EF.

3条回答
  •  旧时难觅i
    2020-12-09 10:52

    I did a couple of test asp.net pages trying to see which performs better. My test was:

    Delete 10,000 records Insert 10,000 records Edit 10,000 records Databind the 10,000 records to a GridView and display on the page

    I was expecting LinqToSQL to be faster but doing the above LinqToSQL takes nearly 2 minutes while LinqToEntities takes less than 20 seconds.

    At least for this test it seems LinqToEntities is faster. My results seem to match yours as well.

    I didn't try Inserting/Editing/Deleting/Displaying more than 1 table joined together though.

    I'm interested in finding out more... or if my test isn't a valid type of test I'd be interested in seeing some real tests.

提交回复
热议问题