why data retrieving slow on C# Entity-Framework Code first when used layered architecture..? -


i'm developing c# desktop application using code first c# entity-framework technology. need use layered architecture these layers on it.

1.entity layer - code first db creation

2.data access layer - accessing db , db related methods here

3.business logic layer - connecting interface data access layer

4.presentation layer - interface designing

on getting data database, takes while load. there way fix it...?

my project manager prof said it's because of layered architecture....

without having idea on model impossible why data retrieval slow. ef slower other orm frameworks on .net works fine. should start analysing model. also, remember have database behind model. users of orm tools have tendency forget this. can use ef profiler see queries sending database server. kind of tools must when using orm on more or less complex model.

one typical issue select n+1 problem when fetch entity has collection of other entities, collection proxied , start loop through it, child entities lazy loaded 1 one, issuing @ least many queries have child entities. in case eager fetchig key solution. but, again, provided no details, have figure out issue yourself. , problem not ef such , not layered architecture.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -