Is there a performance advantage for EntityDataSource over software binding?

I am working on ASP.NET web forms applications with data driven. We use Entity Framework 4.1, and I usually use to bind all my controls in code. I came across a lot of examples using the ASP.NET EntityDataSource control and am wondering if there is any advantage to using this control rather than binding the data to the code behind?

Thanks J

+4
source share
2 answers

I have always considered "specialized" data sources to be risky and against properly imposed applications. EntityDataSource, SqlDataSource, LinqDataSource, name it, you provide low-level access information in your declarative code. It works great for a demo website, but could potentially cause serious big problems.

Instead, did you decide to use an ObjectDataSource ? It can provide the best of two - you provide pure declarative binding, so there is no binding code required, but the DataProvider (or Repository ) class that ultimately provides the data must be written in C #. From this class you can use any data access technology, EF, Linq, SQL, whatever.

+6
source

Source: https://habr.com/ru/post/1380444/


All Articles