public IActionResult UpdateBasic(UpdateBasicAlbumViewModel model)
 {
     if (int.TryParse(model.SingerId, out int singerId))
     {
         var album = new AlbumModel()
         {
             Id       = model.Id,
             Name     = model.Name.Trim(),
             SingerId = singerId,
             MenderId = HttpContext.Session.GetCurrentUserId()
         };
         album = _albumAppService.UpdateBasic(album);
         return(Json(new JsonResultEntity()
         {
             Message = "更新基本信息成功!",
             JsonObject = Json(new AlbumViewModel()
             {
                 Id = album.Id,
                 SingerId = album.SingerId,
                 MenderId = album.MenderId,
                 Name = album.Name,
                 SingerName = album.SingerName,
                 MenderName = album.MenderName,
                 LastModificationTime = album.LastModificationTime?.ToStandardDateOfChina()
             })
         }));
     }
     throw new JMBasicException("歌唱家不存在");
 }
        public IActionResult UpdateBasic(int id, UpdateBasicAlbumViewModel model)
        {
            var album = _albumAppService.GetAlbumById(id);

            model = new UpdateBasicAlbumViewModel()
            {
                Id      = album.Id,
                Name    = album.Name,
                Singers = _singerAppService.GetPublishedSingers()?
                          .Select(s => new SelectListItem()
                {
                    Text     = s.Name,
                    Value    = s.Id.ToString(),
                    Selected = s.Id == album.SingerId
                })
            };
            return(PartialView("_UpdateBasic", model));
        }