Why ContextManager only made for SQL?

Why ContextManager only made for SQL?

Old forum URL: forums.lhotka.net/forums/t/11410.aspx

dblwizard posted on Tuesday, June 12, 2012


I'm working on a project using codesmith's PLINQO design(NHibernate) and I'm wondering why the ContextManager requirese a Linq.DataContext object.  I don't see that it's using anything specific to that DataContext object.  I only did a cursory look so I might have missed something.  Wouldn't it be possible to simply require an IDisposable object and that would allow other designs to use the ContextManager?



JonnyBee replied on Wednesday, June 13, 2012

There is several types of ContextManager available:

ContextManager                   - Linq 2 Sql
ObjectContextManager       - Entity Framework
DbContextManager             - DbContext for EF 4.1 and Up
ConnectionManagerT         - ADO.NET Connection with Generic constraint
ConnectionManager           - ADO.NET Connection without Generic constraint.

ContextManager uses a generic constraint for your actual DataBaseMode and stores this instance inApplicationContext for the duration of a DataPortal call so that you do not have to send this as a parameter between objects.

Copyright (c) Marimer LLC