コード例 #1
0
        public int PlacesLeft()
        {
            var entryPage   = Umbraco.TypedContentAtRoot().First().Children.FirstOrDefault(c => c.DocumentTypeAlias == "entry");
            int totalPlaces = 350;

            if (entryPage != null)
            {
                totalPlaces = (int)entryPage.GetProperty("totalPlaces").Value;
            }

            int entered = _entryRepository.Entered();

            return(totalPlaces - entered);
        }