在nhibernate中保存会话后获取ID(自动编号)?
您好,我正在通过 nhibernate 向表中插入一行数据,如何获取最后插入行的 Id(自动编号)?请帮我...
Hi i am inserting a row of data into a table through nhibernate, how to get the Id(auto number)of the last inserted row? please help me...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Nibernate 会自动执行此操作。如果您放入实体 ID 生成器 =“native” 的映射并设置所需属性的名称
Nhibernate do it automatically. If you put in mapping of entity Id generator="native" and set name of required property