There is STE Generator template for EF 5.x and its information page says:
We no longer recommend using the STE template in new applications, it continues to be available to support existing applications. Visit the N-Tier Applications page for other options we recommend for N-Tier scenarios.
That answers your question. If you want to use STEs without rewriting your application you should use the template and ObjectContext
. In theory you can use DbContext
because you can create a new instance of the DbContext
from existing ObjectContext
(through the constructor). I'm not sure what benefit it will have with STEs.
MS considers WCF Data Services and their client context as replacement for STEs.