コード例 #1
0
 public IActionResult GalleryView(string id)
 {
     Gallery                 = _galleries.FindObject(id);
     Gallery.Paintings       = _paintings.GetOwnerPaintings(id);
     Gallery.Representatives = _users.Users.FindAll(us => us.GalleryId == Gallery.Id);
     return(View(Gallery));
 }
コード例 #2
0
        public IActionResult Index()
        {
            User user = _users.FindUser(User.Identity.Name);

            user.Paintings = _paintings.GetOwnerPaintings(user.Id);
            return(View(user));
        }
コード例 #3
0
        public IActionResult CollectorView(string id)
        {
            User user = _users.Users.Find(us => us.Id == id);

            if (user.IsRepresentative)
            {
                user.Gallery = _galleries.FindObject(user.GalleryId).Title;
            }
            else
            {
                user.Paintings = _paintings.GetOwnerPaintings(user.Id);
            }

            return(View(user));
        }