编码为休眠 [英] coding for nhibernate
本文介绍了编码为休眠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何使用NHibernate编写以下代码:
Hi all,
How to write the following code by using NHibernate:
SqlConnection con=new SqlConnection("Data Source=inndocs3;Initial Catalog=yvk;Persist Security Info=True;User ID=sa;Password=inndocs");
SqlCommand cmd=new SqlCommand();
cmd.Connection=con;
cmd.CommandText="insert into userinfo values(''"+t1.Text+"'',''"+fileupload1.FileName+"'')";
fileupload1.PostedFile.SaveAs(Server.MapPath(".") + "\\" + fileupload1.FileName);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
t1.Text = "";
Response.Write("<H1> File saved</H1>");
请帮帮我.
谢谢
Please help me.
Thank you
推荐答案
http://www.fincher .org/tips/Languages/NHibernate.shtml [ ^ ]
http://nhibernate.sourceforge.net/NHibernateEg/NHibernateEg.Tutorial1A.html [ ^ ]
希望这可以为您提供帮助.
http://www.fincher.org/tips/Languages/NHibernate.shtml[^]
http://nhibernate.sourceforge.net/NHibernateEg/NHibernateEg.Tutorial1A.html[^]
Hope This can help you.
这篇关于编码为休眠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文