如何使用LINQ预测C#中Identity-Column的下一个值? [英] How to foresee the next value of an Identity-Column in C# using LINQ?
本文介绍了如何使用LINQ预测C#中Identity-Column的下一个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我正在编写程序,需要预见 C#中的标识列的下一个值。我使用LINQ来处理数据库。
我该怎么办?
提前谢谢。
Hello,
I'm writing a program and need to foresee the next value of an identity-column in C#. I use LINQ to work with databases.
What should I do?
Thanks in advance.
推荐答案
不要这样做。当有许多其他并发用户时,您可能无法获得实际的下一个标识值。
Don't do that. You may not get the actual next identity value when there are many other concurrent users.
这篇关于如何使用LINQ预测C#中Identity-Column的下一个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文