We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 780acd5 commit 7876115Copy full SHA for 7876115
src/DotNetToolkit.Repository/RepositoryBase.cs
@@ -264,8 +264,8 @@ protected virtual TKey GeneratePrimaryKey()
264
if (propertyType == typeof(int))
265
{
266
var key = GetQuery()
267
- .OrderByDescending(x => x.GetPrimaryKeyPropertyValue<TKey>())
268
.Select(x => x.GetPrimaryKeyPropertyValue<TKey>())
+ .OrderByDescending(x => x)
269
.FirstOrDefault();
270
271
return (TKey)Convert.ChangeType(Convert.ToInt32(key) + 1, typeof(TKey));
0 commit comments