diff --git a/src/Volo.Abp.Security/Volo.Abp.Security.csproj.DotSettings b/src/Volo.Abp.Security/Volo.Abp.Security.csproj.DotSettings
new file mode 100644
index 0000000000..58ad6c8854
--- /dev/null
+++ b/src/Volo.Abp.Security/Volo.Abp.Security.csproj.DotSettings
@@ -0,0 +1,2 @@
+
+ CSharp71
\ No newline at end of file
diff --git a/src/Volo.Abp.Security/Volo/Abp/Users/CurrentUserExtensions.cs b/src/Volo.Abp.Security/Volo/Abp/Users/CurrentUserExtensions.cs
index d6c1054936..43032fe214 100644
--- a/src/Volo.Abp.Security/Volo/Abp/Users/CurrentUserExtensions.cs
+++ b/src/Volo.Abp.Security/Volo/Abp/Users/CurrentUserExtensions.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics;
using JetBrains.Annotations;
namespace Volo.Abp.Users
@@ -22,5 +23,12 @@ namespace Volo.Abp.Users
return value.To();
}
+
+ public static Guid GetId(this ICurrentUser currentUser)
+ {
+ Debug.Assert(currentUser.Id != null, "currentUser.Id != null");
+
+ return currentUser.Id.Value;
+ }
}
}
\ No newline at end of file