C# to SQL

What is the latest & greatest way to access and manipulate data stored in a Microsoft SQL server?

I suspect right now we're doing it in an archaic way.

Dim sqlConnection As New SqlClient.SqlConnection(sqlConnectionString)
Dim sqlCommand As New SqlClient.SqlCommand(sqlStoredProcedure, sqlConnection)
sqlConnection.Open()
sqlCommand.ExecuteNonQuery()
sqlConnection.Close()

Open in new window

(Yes it's VB code)

Is LINQ the way to go nowadays?
deleydAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
though LINQ gives you a really good way to access data from lists and tables (that are already in memory), for me nothing is better (including my part as dba and tuning work) than a stored procedure, which first of all hides the physical layer of the tables and hence the sql from the application code, but also can be optimized and tuned without having to touch the application code (unless the change is more than just the physical representation tuning)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Éric MoreauSenior .Net ConsultantCommented:
Entity Framework is the latest and probably the greatest so far (hoping that your database model is clean).

It can generate your complete DAL providing you objects to manipulate (using LINQ if you want) from your business layer.
0
it_saigeDeveloperCommented:
In conjunction to what Angel has stated, at least from the application perspective, EF or LINQ to SQL are the more preferential ways to access and manipulate data that is retrieved from the database.

-saige-
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.