Exemple #1
0
        private static void CloseSession()
        {
            try
            {
                var session2 = SQLiteSessionManager.Unbind();

                if (session2 != null)
                {
                    if (session2.Transaction.IsActive)
                    {
                        try
                        {
                            session2.Transaction.Commit();
                        }
                        catch
                        {
                            session2.Transaction.Rollback();
                        }
                    }
                    session2.Close();
                }
            }
            catch
            {
            }
        }