/// <summary> /// Initialize the AutoMapper mappings for the solution. /// http://automapper.codeplex.com/ /// </summary> public static void CreateAutoMapperMaps() { AutofacRegistrations.RegisterDaoFactory(); ILifetimeScope scope = AutofacRegistrations.Container.BeginLifetimeScope(); var daoFactory = scope.Resolve <IDaoFactory>(); Mapper.CreateMap <Error, ErrorDto>() .ReverseMap(); IPlaylistDao playlistDao = daoFactory.GetPlaylistDao(); IUserDao userDao = daoFactory.GetUserDao(); Mapper.CreateMap <Playlist, PlaylistDto>(); Mapper.CreateMap <PlaylistDto, Playlist>() .ForMember(playlist => playlist.User, opt => opt.MapFrom(playlistDto => userDao.Get(playlistDto.UserId))); Mapper.CreateMap <PlaylistItem, PlaylistItemDto>(); Mapper.CreateMap <PlaylistItemDto, PlaylistItem>() .ForMember(playlistItem => playlistItem.Playlist, opt => opt.MapFrom(playlistItemDto => playlistDao.Get(playlistItemDto.PlaylistId))); Mapper.CreateMap <ShareCode, ShareCodeDto>().ReverseMap(); Mapper.CreateMap <User, UserDto>().ReverseMap(); Mapper.CreateMap <Video, VideoDto>().ReverseMap(); Mapper.AssertConfigurationIsValid(); }
public PlaylistService(IPlaylistDao <DataAccess.Firestore.Model.Playlist> dao, IPlaylistMapper <DataAccess.Firestore.Model.Playlist> mapper, ISongService songService, SpotifyService spotify) { this._dao = dao; this._mapper = mapper; this._songService = songService; this.spotify = spotify; }
public new void TestFixtureSetUp() { try { PlaylistDao = DaoFactory.GetPlaylistDao(); } catch (TypeInitializationException exception) { throw exception.InnerException; } }
public new void TestFixtureSetUp() { try { PlaylistDao = DaoFactory.GetPlaylistDao(); } catch (TypeInitializationException exception) { throw exception.InnerException; } }
public PlaylistController() { try { PlaylistDao = new PlaylistDao(); FolderDao = new FolderDao(); ShareCodeDao = new ShareCodeDao(); } catch (TypeInitializationException exception) { Logger.Error(exception.InnerException); throw exception.InnerException; } }
public PlaylistController() { try { PlaylistDao = new PlaylistDao(); FolderDao = new FolderDao(); ShareCodeDao = new ShareCodeDao(); } catch (TypeInitializationException exception) { Logger.Error(exception.InnerException); throw exception.InnerException; } }
public PlaylistManager(ILog logger, IPlaylistDao playlistDao) : base(logger) { PlaylistDao = playlistDao; }
public PlaylistManager(ILog logger, IPlaylistDao playlistDao) : base(logger) { PlaylistDao = playlistDao; }
public PlaylistManager(ILog logger, IPlaylistDao playlistDao, IVideoDao videoDao) : base(logger) { PlaylistDao = playlistDao; VideoDao = videoDao; }
public IPlaylistDao GetPlaylistDao(ISession session) { return PlaylistDao ?? (PlaylistDao = new PlaylistDao(session)); }
public PlaylistManager(ILog logger, IPlaylistDao playlistDao, IVideoDao videoDao) : base(logger) { PlaylistDao = playlistDao; VideoDao = videoDao; }
public override void fixtureSetUp() { base.fixtureSetUp(); this.dao = daoFactory.getPlaylistDao(); }
public IPlaylistDao GetPlaylistDao(ISession session) { return(PlaylistDao ?? (PlaylistDao = new PlaylistDao(session))); }
public IPlaylistDao GetPlaylistDao() { return PlaylistDao ?? (PlaylistDao = new PlaylistDao(Session)); }
public PlaylistService(List <ISongServicePlaylistSaver> services, IPlaylistDao playlistDao) { _playlistDao = playlistDao; this.Services = services; }
public IPlaylistDao GetPlaylistDao() { return(PlaylistDao ?? (PlaylistDao = new PlaylistDao(Session))); }
public override void setUp() { pdao = daoFactory.getPlaylistDao(); adao = daoFactory.getAirplayDao(); p1 = pdao.GetById(1L, false); p2 = pdao.GetById(2L, false); ap1 = adao.GetById(1L, false); ap2 = adao.GetById(2L, false); base.setUp(); }