Beispiel #1
0
 public static void UserDoesNotExist <T>(this IRuleBuilderOptions <T, string> rule, ISecurityService securityService)
 {
     rule.MustAsync((x, ct) => securityService.FindByNameAsync(x, UserDetails.Reduced).ContinueWith(result => result.Result == null, ct))
     .WithMessage(string.Format(B2BCustomerResources.UserAlreadyExist, Constants.PropertyValue));
 }