public SongViewModel GetConversationCurrentSong(Conversation conversation)
        {
            var song = _musicRepository.GetSong(conversation.SongAtThisMoment);
            if (song != null)
            {
                return ModelConverters.ToSongViewModel(song);
            }

            return null;
        }
示例#2
0
 public static ConversationViewModel ToConversationViewModel(Conversation conversation)
 {
     Mapper.CreateMap<Conversation, ConversationViewModel>();
     return Mapper.Map<Conversation, ConversationViewModel>(conversation);
 }