Exemplo n.º 1
0
            /// <summary>
            /// Persists an entity to the persistence store
            /// </summary>
            /// <param name="graphInstance"></param>
            protected override void SaveInstance(GraphInstance graphInstance)
            {
                ISession session = sessionFactory.GetCurrentSession();

                using (ITransaction tx = session.BeginTransaction())
                {
                    session.SaveOrUpdate(graphInstance.Instance.GetType().BaseType.ToString(), graphInstance.Instance);
                    tx.Commit();
                }

                this.OnSave(graphInstance);
            }