Problems related to nhib.pdf: how to solve the problem

Source: Internet
Author: User
Cheonan asked nhib.pdf, asking experts to solve the problem.
The following actions are made in sequence objects ﹕

Isession S = sessionfactory. opensession ();
Itransaction T = S. begintransaction ();
Try
{
S. Save (entity );
T. Commit ();
}
Catch (exception E)
{
T. rollback ();
Throw E;
}
Finally
{
S. Close ();
}
Using nunit statements to explain how SQL statements are like this. First, remove my tables, create tables, and then add new ones. Why. Bytes
drop table g_users
drop table g_guestbook
Create Table g_users (
ID int identity not null,
name nvarchar (20) null,
email nvarchar (40) null,
password nvarchar (20) null,
flag int null,
regtime datetime null,
Primary Key (ID)
Create Table g_guestbook (
ID int identity not null,
userid int null,
username nvarchar (20) null,
title nvarchar (100) null,
Article nvarchar (255) null,
pubtime datetime null,
Primary Key (ID)
nhibers: insert into g_users (email, name, regtime, password, flag) values (@ P0, @ P1, @ P2, @ P3, @ P4); select scope_identity ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.