Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Difference Between Entity Framework And Stored Procedure
WhatsApp
Priti Ranjan Dash
9y
54.1
k
0
0
25
Blog
Entity Framework
Entity Framework is using linq query to write the database operation.
By using linq queries, we are writing common query across all the data sources, regardless of its data source.
a.We are writing same styled syntax for any type of database like Sql server, Mysql, Orracle etc.
b.So LINQ query provide a uniform programming model.
LINQ query provide compile time error checking. We can watch the spelling and syntax while we write queries in linq.
LINQ query provides intellisense feature, means by writing one letter all the keyword corresponding to that letter or word appears in the visual studiointellisence window.
If there is any change in the database, table, column or datatype then you have to change or Update the Model.edmxfile.
Bu using Model designer we can see the Entity relationships visually, means which table is related to which table.
Stored Procedure
A Stored Procedure is aprecompiled object, when a statement is executed, it actually doing two things one is Compilation and second is Execution.
a. Thus a Stored Procedure is in precompiled state it is only about to execute, that why it is taking less time to execute.
In Stored Procedure, SQL Queries can be saved and the same stored procedure will be used multiple times, until the target table is not changed.
Stored Procedure is using parameterized query, that why it avoid Sql-Injection attacks.
Stored Procedure is using dynamic sql query syntax.
Store Procedure is faster than the LINQ query.
Stored Procedure is good for writing more complex database queries.
If there is any change in the database, table, column or datatype then you have to change or Update the Stored Procedure.
Difference Between Entityframework and stored Procedure
Up Next
Difference Between Stored Procedures and Triggers
Ebook Download
View all
Basics of SQL Server
Read by 1.5k people
Download Now!
Learn
View all
Membership not found