Exemplo n.º 1
0
        public CountsViewModel ShowUsersAndPicturesCount()
        {
            var usersCount      = db.Users.Where(u => u.EmailConfirmed).Count();
            var obituariesCount = db.Obituaries.Count();
            var picturesCount   = db.Pictures.Count();

            var counts = new CountsViewModel
            {
                TotalUsersCount        = usersCount,
                TotalObituaryCount     = obituariesCount,
                TotalUserPicturesCount = picturesCount,
            };

            return(counts);
        }