Warning : Noob Question !
I am being pushed into using MVC & EF for my projects; both of which are new to me. The MVC part I'm not too stressed about, but EF bothers me, there are some key concepts that my head just isn't around yet.
My database is a repository of millions of records which users will need to perform very complex searches upon.
Seems that the majority of articles I read are hooking the DB up to the Application with EF, and filtering data client-side. That's just a 'No' for me, and I can't imagine that I am the only one.
Then I have seen some articles that talk of pushing the filters back to the DB using LINQ/IQueryables. That sounds more reasonable, at least I would not be bringing back more data than I need. But my more complex queries would be nightmare to build in LINQ (I imagine).
Still, what bothers me, is that I have SQL Server to do all that heavy lifting for me. Store Procedures that can utilize most powerful mechanisms for the most complex queries imaginable. Isn't that what SQL Server was born to do ?
I am still thinking to bulldoze ahead with my old Skool brain.
Can anyone point out where I might be viewing all this wrongly ? I know that there is heaps of info on Google, but most just jump into how to technically do 'A'... with little discussion over 'why' we are doing 'A' or what the alternatives are.
Thanks for any comment !
答案 0 :(得分:0)
Point 1 :
Yes,you can start it as you mentioned.That is Build Models that reflect my data tables/structure
.That means you're going to create everything by hand manually. Which is very tricky task hence you're already having the db.So I would like to suggest to use EntityFramework Reverse POCO Generator for generating the required models from your db.
Point 2 :
Yes,You can use Stored procedures
with the EF code first.But be careful not to use EF core
at this moment. B'cos the SP support is at the beginning level right now.So you can start with EF 6.X
and later with the maturity of the EF core where you can move easily to the EF core
world.
Point 3 :
You don't need to worry about the size of the records which you have to show on the UI. B'cos there having so many sophisticated UI components which are build for showing massive data on the UI. You can choose either from free
or paid
once.