Example #1
0
 public WeChatApp(
     Guid id,
     Guid?tenantId,
     WeChatAppType type,
     Guid?weChatComponentId,
     [NotNull] string name,
     [NotNull] string displayName,
     [NotNull] string openAppIdOrName,
     [NotNull] string appId,
     [CanBeNull] string appSecret,
     [CanBeNull] string token,
     [CanBeNull] string encodingAesKey,
     bool isStatic) : base(id)
 {
     TenantId          = tenantId;
     Type              = type;
     WeChatComponentId = weChatComponentId;
     Name              = name;
     DisplayName       = displayName;
     OpenAppIdOrName   = openAppIdOrName;
     AppId             = appId;
     AppSecret         = appSecret;
     Token             = token;
     EncodingAesKey    = encodingAesKey;
     IsStatic          = isStatic;
 }
Example #2
0
 public virtual async Task <bool> AnyInWeChatAppTypeAsync(WeChatAppType type, Expression <Func <WeChatAppUser, bool> > predicate)
 {
     return(await(await GetQueryableAsync())
            .Where(predicate)
            .Join((await GetDbContextAsync()).WeChatApps, mpUser => mpUser.WeChatAppId, weChatApp => weChatApp.Id,
                  (mpUser, weChatApp) => new { MpUser = mpUser, WeChatApp = weChatApp })
            .Where(x => x.WeChatApp.Type == type)
            .AnyAsync());
 }