In my current situation I am one of two developers at a manufacturer. We have been extending the functionality of existing applications (ERP and some others).

These third party applications do not allow for much modification of their database as it may/would break the application. We are strongest in T-SQL and have many stored procedures that implement the logic needed to return a db set with a minimal wrapper to the .net applications.

I have also built another code-first application using Entity Framework that lives in Azure. I'd like to take some of the practices of this and apply it to what we are doing.

Keeping in mind we have little control over the third party applications what are the recommended best practices?

Would it still be using T-SQL with a minimal wrapper to return data or can we also do that using Entity Framework for some continuity between custom apps.

  • You can use Entity Framework as a minimalist wrapper, if you like, including calling your stored procedures. See docs.microsoft.com/en-us/ef/ef6/querying/raw-sql Or you can use a micro-ORM like Dapper. Oct 22, 2018 at 17:37
  • Do you think making the wrapper a web api so all our applications could be consistent makes sense? Api.StoredProcedure?
    – Matt
    Oct 22, 2018 at 17:57
  • Well, that's a different part of your application. I assumed you were discussing the Data Access Layer. Oct 22, 2018 at 18:11
  • I'll add a second question to keep this one focused
    – Matt
    Oct 22, 2018 at 18:28

1 Answer 1


Entity framework is... fine.

But if you are happy with sql and sqlclient do yourself a favour and just skip it.

Just have a search on stackoverflow for EF questions and you see the trouble people get into.

There really isnt any concrete benefit EF has over sqlclient except saved typing.

In your particular case with an existing 3rd party database and stored procedures you have all the more reason to use custom code to interface between your code and the db rather than an ORM.

You will have cases which simple 'convention over configuration' cant apply and you are forced to get into the nitty gritty of the ORMs pardigm tohack things together.

Whereas with your own hardcoding mapping its simple to do a particular field or sproc differently from the others.

  • "Saved typing" is no small thing. Oct 22, 2018 at 17:38
  • @rh code golf all the way
    – Ewan
    Oct 23, 2018 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.