http://www.zvolkov.com/clog/2009/07/09/why-nhibernate-updates-db-on-commit-of-read-only-transaction/ Always be careful with NULLable fields whenever you deal with NHibernate. If your field is NULLable in DB, make sure corresponding .NET class uses Nu…
转载:https://www.cnblogs.com/liaojunbo/archive/2011/07/11/2103491.html 1.显式的DB Commit 显式的DB Commit并没有对应的ABAP 语句来执行DB Commit,它是由平常的语句Commit Work来进行的.一个DB LUW中,我们是以该DB被打开,然后以DB Commit结束. 2.隐式的DB Commit 隐式的DB Commit更没有对应的ABAP语句来告诉系统(Okay,您给我偷偷模模做一下commit)…
最近研究内存关系数据库的设计与实现,下面一篇为berkeley db原始两位作为的Berkeley DB设计回忆录: Conway's Law states that a design reflects the structure of the organization that produced it. Stretching that a bit, we might anticipate that a software artifact designed and initially produ…
我这里主要分成了两个xml来进行spring.net管理实际情况中可自己根据需要进行分类 Dao2.xml <?xml version="1.0" encoding="utf-8" ?> <objects xmlns="http://www.springframework.net" xmlns:db="http://www.springframework.net/database" xmlns:tx=&quo…
摘要 NHibernate实现事务机制非常简单,调用ISession.BeginTransaction()开启一个事务对象ITransaction,使用ITransaction.Commit()提交事务,使用ITransaction.Rollback()回滚事务. 标准NHibernate事务代码: using (var session = SessionFactory.OpenSession()) { using (var transaction = session.BeginTransact…
摘要 在实际的项目中,经常是将NHibernate的实体关系映射类做成独立的工程(assembly dll),只对外提供Session调用的接口.这个程序集作为数据访问层,可以被上面的多个工程(ASP.Net.Windows Form.Windows Serviice等)调用. 这篇文章介绍如何设计NHibernate数据访问层的工程,以及如何架构数据访问层和上面的应用层的关系. 本文章的所有代码可以到第一个NHibernate程序下载. 步骤: 1)为了后面文章的程序演示方便,删除Custom…
NHibernate Session-per-request and MiniProfiler.NHibernate 前言 1.本文以mvc3为例,借鉴开源项目 NerdDnner项目完成nhibernate中的 Session-per-request 模式,本文创建了一个自定义的httpmodel类,来实现在http请求的时候创建并开启一个session并绑定到CurrentSessionContext中,当请求完成以后关闭,同时包含对事物的处理. 2.利用MiniProfiler.NHibe…
mysql http://www.cnblogs.com/zhangzhu/archive/2013/07/04/3172486.html 1.连接到本机上的MYSQL.首先打开DOS窗口,然后进入目录mysql\bin,再键入命令mysql -u root -p,回车后提示你输密码.注意用户名前可以有空格也可以没有空格,但是密码前必须没有空格,否则让你重新输入密码. 例1:建立一个名为xhkdb的数据库   mysql> create database xhkdb; py-mysql http…
for account_info in valid_account_detail: try: account = account_info.get('account') password = account_info.get('password') # date = account_info.get('date') q1 = account_info.get('q1') a1 = account_info.get('a1') q2 = account_info.get('q2') a2 = ac…
SessionManager using System; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Web; using NHibernate; using NHibernate.Cfg; using NHibernate.Context; namespace Northwind.Repositori…