public AlbumsController() : base() { DbContext context = ContextFactory.GetNewContext(ContextType.SQL); UserRepository repository = new UserRepository(context); PhotoRepository photos = new PhotoRepository(context); AlbumRepository albums = new AlbumRepository(context); IGoogleServices googleServices = new GoogleServices(); Users = new UserLogic(repository, googleServices); Albums = new AlbumLogic(repository, photos, albums); }
public AlbumTests() { var kernel = NinjectWebCommon.GetKernel(); this.logic = kernel.Get <IAlbumLogic>(); this.pageInfo = new PageInfo { PageNumber = 0, PageSize = int.MaxValue / 2, }; }
public void Initialize() { //context = InitializeSQL(); context = InitializeMemory(); IRepository <User> repository = new UserRepository(context); IRepository <Photo> photos = new PhotoRepository(context); IRepository <Album> albums = new AlbumRepository(context); GoogleServices = new Mock <IGoogleServices>(MockBehavior.Strict); UserLogic = new UserLogic(repository, GoogleServices.Object); SessionLogic = new SessionLogic(repository); AlbumLogic = new AlbumLogic(repository, photos, albums); }
public AlbumsController(IAlbumLogic albumLogic) { this.albumLogic = albumLogic; }
public AlbumsController(IAlbumLogic logic) { this.logic = logic; }
public AlbumService(IAlbumLogic albumLogic) { _albumLogic = albumLogic; }
public AlbumController(IAlbumLogic logic) { _logic = logic; }