コード例 #1
0
ファイル: Index.cshtml.cs プロジェクト: pikapika0418/IS7012
        public void OnGet()
        {
            Countries = _context.Country.ToList();
            Athletes  = _context.Athlete.ToList();

            AthleteCount = Athletes.Count();
        }
コード例 #2
0
        public bool CanDelete( )
        {
            if (Championship == null)
            {
                return(true);
            }

            if (Championship.isLocked( ))
            {
                return(false);
            }

            // 2016-05-29 optimised by not using getAllAthletes which instantiates each athlete.
            return(Athletes.Count( ) == 0);
            //return ( getAllAthletes ( ).Count == 0 );
        }