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; }
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()); }