Added ICurrentUser.GetId() extension method.

pull/272/head
Halil İbrahim Kalkan 8 years ago
parent 3221924b99
commit 1045e9dae4

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp71</s:String></wpf:ResourceDictionary>

@ -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<T>();
}
public static Guid GetId(this ICurrentUser currentUser)
{
Debug.Assert(currentUser.Id != null, "currentUser.Id != null");
return currentUser.Id.Value;
}
}
}
Loading…
Cancel
Save