public SongViewModel GetConversationCurrentSong(Conversation conversation) { var song = _musicRepository.GetSong(conversation.SongAtThisMoment); if (song != null) { return ModelConverters.ToSongViewModel(song); } return null; }
public static ConversationViewModel ToConversationViewModel(Conversation conversation) { Mapper.CreateMap<Conversation, ConversationViewModel>(); return Mapper.Map<Conversation, ConversationViewModel>(conversation); }