ahmadadnan


Comments:

Comparison of Linq to Sql and Orasis Generated Data Access Code

posted by ahmadadnanahmadadnan(30) 3 years ago 0

@johnsheehan: "There is nothing here about performance "

The title of the article does not emphasise the performance factor, it is a comparison of the API to call Orasis and Linq to SQL code, both of which follow the Object Oriented Data Access paradigm. The Developer only accesses the layer through pure dot net objects and it returns pure dot net objects. The difference is that through using Orasis the Data Access API is actually generated through the tool and you can see all the code that is generated. The code is absolutely free of any third party dependencies and is pure ADO.NET 2.0 code. It executes much faster compared to other technologies that generate SQL statements internally and use reflecton to populate the layers such as Linq to SQL, NHibernate, etc. You will be seeing articles about performance comparisons in the future. You can read more about performance in this article here: http://forums.orasissoftware.com/comments.php?DiscussionID=2&page=1#Item_0 which talks about other factors including performance.

@Damien: "Hmm. Amusingly many of the Orasis API calls take lists of objects to insert/delete rather than a single instance so there is an overhead of creating a new list for every call even when you only want to send one item. "

The reason for usings Lists is to keep the method signature to update and retrieve a single object versus multiple objects consisent. You could pass a list of ten objects, all which need to be inserted, updated or deleted or just one. The overhead of creating a List is negligible compared to the gain in code and API consistency. Also, the loss of performance overhead in LINQ to SQL due to configuration, reflection, and unoptimized generated SQL is way more costly than creating a List.

Reply