Monday, 15 August 2011

SubSonic 3 Repository - SQLite In-Memory -


Before investing time in revising the SubSonic 3 source, I thought I should ask to ask whether I am missing something simple or not.

Is it possible to use the subsonic 3 repository with the migration to the SQLite in-memory database? I can not find a way to force the DbDataProvider to keep the connection open so that in-memory secured will not disappear when the connection is received.

The unit test with the connection string was I was trying to ...

  public class SQLite_Inmemory_SimpleRepositoryTests {Public Sector Job (Public Guide Job) {Received; Set; } Public String JobName {get; Set; }} [Facts] Public Zero SQLite_Inmemory_SimpleRepo_CanStayOpen () {IDataProvider Provider = ProviderFactory.GetProvider ("Data Source =: Memory:; Version = 3; New = True; Pooling = True; Max Pool Size = 1;", "System.Data .SQLite "); Irrespotory repository = New Simple Repository (Provider, SimpleRepository Options. Renewal); {Var job = new job} {JobId = Guid.NewGuid (), JobName = "Job _" + i} for (Int i = 0; I & lt; 10000; i ++); Repository.Add (work); }}}  

I tried to set a "shared connection" on IDataProvider, but the connection was still closing.

If not, then I submit SubSonic sources, and changes.

Thank you! Interesting - Nobody is about to do this other than the way I build a steady IDataProvider;

I think you can make such a thing by applying it to IDataProvider so you need to set things up - all the execution goes through it. But it is surprising to me whether we explicitly close some things in the calling code - which will be a bad design on my part ... hmmm

Would like to like this feature ...


No comments:

Post a Comment