コード例 #1
0
        //Updates artwork list.
        private async Task <List <Artwork> > UpdateArtworkListAsync()
        {
            var artworkList = await _artworkService.GetArtworks();

            lock (_artworkList)
            {
                _artworkList.Clear();
                _artworkList.AddRange(artworkList);
            }

            return(_artworkList);
        }
コード例 #2
0
        // GET: /Artwork/
        public ActionResult Index()
        {
            var artworks = _artworkService.GetArtworks();

            return(View(artworks));
        }