我想问一下NHibernate的问题???

代码运行通过但数据无法存入数据库问题
博主完成代码编写且运行通过,但数据无法存入数据库,怀疑save函数不能存数据到数据库,并给出相关代码,代码中创建配置、用户对象,打开会话保存用户数据后关闭会话。
我现在做了个小东东代码都写好了,运行都通过了,为什么数据不能存入数据库中,是不是save函数不能存数据到数据库的????
代码如下:
   Configuration cfg = new Configuration();
   cfg.AddAssembly("MyNhibernate");
   cfg.AddXmlFile ("F:\\jinqi\\MyNhibernate\\User.hbm.xml");
   MyUser newUser =new MyUser();
   newUser.Id = "joe_cool";
   newUser.UserName = "Joseph Cool";
   newUser.Password = "abc123";
   newUser.EmailAddress = " joe@cool.com";
   ISession session= cfg.BuildSessionFactory().OpenSession();
   session.Save (newUser);
   session.Close ();
请将函数名称提取出来interface ISession { void generateChallenge(); void revokeChallenge(in long challenge); android.hardware.biometrics.face.EnrollmentStageConfig[] getEnrollmentConfig(in android.hardware.biometrics.face.EnrollmentType enrollmentType); /** * @deprecated use {@link enrollWithOptions} instead. */ android.hardware.biometrics.common.ICancellationSignal enroll(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in @nullable android.hardware.common.NativeHandle previewSurface); android.hardware.biometrics.common.ICancellationSignal authenticate(in long operationId); android.hardware.biometrics.common.ICancellationSignal detectInteraction(); void enumerateEnrollments(); void removeEnrollments(in int[] enrollmentIds); void getFeatures(); void setFeature(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.Feature feature, boolean enabled); void getAuthenticatorId(); void invalidateAuthenticatorId(); void resetLockout(in android.hardware.keymaster.HardwareAuthToken hat); void close(); android.hardware.biometrics.common.ICancellationSignal authenticateWithContext(in long operationId, in android.hardware.biometrics.common.OperationContext context); /** * @deprecated use {@link enrollWithOptions} instead. */ android.hardware.biometrics.common.ICancellationSignal enrollWithContext(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in @nullable android.hardware.common.NativeHandle previewSurface, in android.hardware.biometrics.common.OperationContext context); android.hardware.biometrics.common.ICancellationSignal detectInteractionWithContext(in android.hardware.biometrics.common.OperationContext context); void onContextChanged(in android.hardware.biometrics.common.OperationContext context); android.hardware.biometrics.common.ICancellationSignal enrollWithOptions(in android.hardware.biometrics.face.FaceEnrollOptions options); }
06-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值