Hi,
I'm setting up an asp.net system - Webforms MVP, Memcached, XMPP and other nice gadgets...
Thing is.... I'm used to Entity Framework (EF)... I've even tried
horribly to get Telerik Open Access (OA) working - and ORM that does not
do what it should....
Both EF and OA follow a pattern that makes sense with the "web" - State
Less - every time a user clicks or "moves" or interacts, it is in fact a
complete new action. A new action, as in the system disconnects
completely...
"Disconnecting completely" is the very nature of the "web". After each (page/http)request, a user might go to another site...
So, the pattern I learned is to put all datacode with "using" statements...
public Account GetAccountByID(int AccountID)
{
Account account = null;
using (DataContext dc = conn.GetContext())
{
account = (from a in dc.Accounts
where a.AccountID == AccountID
select a).FirstOrDefault();
}
return account;
}
The above using statement takes care of disposing the ObjectContext (EF). Per request.
My question is - how does DevForce handle disposing?
From the info I've read, the (DevForce) EntityManager is the equivalent for the (EF) ObjectContext - am I correct?
I've tried a using statement with EntityManager, but the Dispose() is
not implemented (not derived from IDisposable) so that doesn't work....
Any suggestions?
I've searched thoroughly through the documentation, but I could not find
any sampling for asp.net - only Silverlight/WPF - does that mean
DevForce doesn't like asp.net?
How do you connect with memcached?
Thanks for answering all my questions!
Regards!