Exemplo n.º 1
0
            public async Task <object> Handle(Query request, CancellationToken cancellationToken)
            {
                var cached = await _storage.ViewModel <AccountStatusView>(request.UserId);

                if (cached != null)
                {
                    Console.WriteLine("Status check from cache");
                    cached.LoggedIn = true;
                    return(cached);
                }

                Console.WriteLine("Status check from db");

                return(await GetFromDatabase(request.UserId));
            }