コード例 #1
0
        public IActionResult GetUnpublishedAlbums()
        {
            var models = _albumAppService.GetUnpublishedAlbums()?
                         .OrderByDescending(s1 => s1.LastModificationTime)
                         .ThenByDescending(s2 => s2.CreationTime)
                         .Select((s, i) => new AlbumViewModel()
            {
                SId                  = ++i,
                Id                   = s.Id,
                SingerId             = s.SingerId,
                CreatorId            = s.CreatorId,
                MenderId             = s.MenderId,
                UnpublisherId        = s.UnpublisherId,
                Name                 = s.Name,
                CreatorName          = s.CreatorName,
                MenderName           = s.MenderName,
                UnpublisherName      = s.UnpublisherName,
                SingerName           = s.SingerName,
                CreationTime         = s.CreationTime.ToStandardDateOfChina(),
                LastModificationTime = s.LastModificationTime?.ToStandardDateOfChina()
            });

            return(Json(models));
        }