public EsentSession BeginSession()
        {
            var session = EsentSession.Begin(this);

            Sessions.Add(session);
            return(session);
        }
 internal static EsentTransaction Begin(EsentSession session)
 {
     return(new EsentTransaction
     {
         Session = session
     }.Begin());
 }
Example #3
0
 internal static EsentDatabase Open(EsentSession session, string path)
 {
     return(new EsentDatabase
     {
         Session = session,
         FilePath = path
     }.Open());
 }
Example #4
0
        internal static EsentDatabase Create(EsentSession session, string path, bool overwrite)
        {
            var db = new EsentDatabase
            {
                Session  = session,
                FilePath = path
            };

            Api.JetCreateDatabase(session.JetId, path, null, out db.JetId,
                                  overwrite ? CreateDatabaseGrbit.OverwriteExisting : CreateDatabaseGrbit.None);
            db.Opened = true;
            return(db);
        }