Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using AddOrUpdate from System.Data.Entity.Migrations
Message
From
08/04/2014 15:46:15
 
 
To
08/04/2014 15:28:20
General information
Forum:
ASP.NET
Category:
Entity Framework
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01598293
Message ID:
01598301
Views:
28
>I can guarantee your coworker knows less about EF than Julie. That said, the post discusses EF 4.3 and things may have changed since. EF 6.02 is the current version.
>
>I agree with Naomi and Kevin. Don't do this at the application layer.
>

Follow-up on what I mentioned yesterday, about developers coming in to clean up bad approaches and being praised for far more than they really deserve

Last summer I did a 2-day consulting trip for a place in New Jersey, where (among other things) the previous developer was using EF to invoke a stored procedure for a reporting process....invoking the proc up to 150,000 times, one for each row back in the EF layer. The process took up to five minutes. The developer actually told the client it would still be faster than passing up all the entity values in one shot. Turns out the developer didn't know how to do it, because he didn't know a bloody thing about SQL Server.

I changed the code around to pass up a table type to the proc, and used a MERGE on the inside, and the process took about 15 seconds. (Then we had to spend an hour showing the business people that the end result values were still the same, because they figured anything that much faster must be missing steps.)

So I got 2 days of billable time and 2 free dinners....all because the previous developer went "Full Retard" (borrowing from the line in the movie Tropic Thunder). Not an indictment of entity framework...the wrong person can mess up an application in any tool. Then again, thank goodness for idiots, they help my bottom line :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform