Пример #1
0
        public SongListContract(SongList list, IUserPermissionContext permissionContext)
            : base(list)
        {
            ParamIs.NotNull(() => list);

            Author      = new UserForApiContract(list.Author);
            CanEdit     = EntryPermissionManager.CanEditSongList(permissionContext, list);
            Deleted     = list.Deleted;
            Description = list.Description;
            EventDate   = list.EventDate;
            Status      = list.Status;
            Thumb       = (list.Thumb != null ? new EntryThumbContract(list.Thumb) : null);
            Version     = list.Version;
        }
Пример #2
0
 public SongListDetailsViewModel(SongListForApiContract songList, IUserPermissionContext permissionContext)
 {
     CanEdit  = EntryPermissionManager.CanEditSongList(permissionContext, songList);
     SongList = songList;
 }