public void GermanString()
 {
   UInt64 id = 0;
   using (SessionNoServer session = new SessionNoServer(s_systemDir))
   {
     using (var trans = new TransactionScope())
     {
       session.BeginUpdate();
       VelocityDbSchema.Person person = new VelocityDbSchema.Person();
       person.LastName = "Med vänliga hälsningar";
       id = session.Persist(person);
       trans.Complete();
     }
   }
   using (SessionNoServer session = new SessionNoServer(s_systemDir))
   {
     using (var trans = new TransactionScope())
     {
       session.BeginUpdate();
       VelocityDbSchema.Person person = session.Open<VelocityDbSchema.Person>(id);
       person.LastName = "Mit freundlichen Grüßen";
       trans.Complete();
     }
   }
   using (SessionNoServer session = new SessionNoServer(s_systemDir))
   {
     using (var trans = new TransactionScope())
     {
       session.BeginUpdate();
       VelocityDbSchema.Person person = session.Open<VelocityDbSchema.Person>(id);
       person.LastName = "Med vänliga hälsningar";
       trans.Complete();
     }
   }
 }
示例#2
0
        public void GermanString()
        {
            UInt64 id = 0;

            using (SessionNoServer session = new SessionNoServer(s_systemDir))
            {
                using (var trans = new TransactionScope())
                {
                    session.BeginUpdate();
                    VelocityDbSchema.Person person = new VelocityDbSchema.Person();
                    person.LastName = "Med vänliga hälsningar";
                    id = session.Persist(person);
                    trans.Complete();
                }
            }
            using (SessionNoServer session = new SessionNoServer(s_systemDir))
            {
                using (var trans = new TransactionScope())
                {
                    session.BeginUpdate();
                    VelocityDbSchema.Person person = session.Open <VelocityDbSchema.Person>(id);
                    person.LastName = "Mit freundlichen Grüßen";
                    trans.Complete();
                }
            }
            using (SessionNoServer session = new SessionNoServer(s_systemDir))
            {
                using (var trans = new TransactionScope())
                {
                    session.BeginUpdate();
                    VelocityDbSchema.Person person = session.Open <VelocityDbSchema.Person>(id);
                    person.LastName = "Med vänliga hälsningar";
                    trans.Complete();
                }
            }
        }