public Façade() { dataModelContainer = new DataModelContainer(); utilisateurDao = new UtilisateurDao(dataModelContainer); movieDao = new MovieDao(dataModelContainer); commentsDao = new CommentsDao(dataModelContainer); }
public RepositoryMovie(IConnectionFactory connectionFactory) : base(connectionFactory) { _movieDao = DaoFactory.CreateMovieDao(); _genreDao = DaoFactory.CreateGenreDao(); _movieActorDao = DaoFactory.CreateMovieActorDao(); _actorDao = DaoFactory.CreateActorDao(); }
public MovieManager( IMovieDao movieDao, IMapper mapper, IMovieServiceValidator validator) { _movieDao = movieDao ?? throw new ArgumentNullException(nameof(movieDao)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _validator = validator ?? throw new ArgumentNullException(nameof(validator)); }
public RepositorySchedule(IConnectionFactory connectionFactory) : base(connectionFactory) { _scheduleDao = DaoFactory.CreateScheduleDao(); _cinemaHallDao = DaoFactory.CreateCinemaHallDao(); _movieDao = DaoFactory.CreateMovieDao(); MinPriceWeekday = 7.0M; MaxPriceWeekday = 12.5M; MinPriceWeekend = 9.5M; MaxPriceWeekend = 15.5M; MinSchedulesPerDay = 6; MaxSchedulesPerDay = 10; }
//构造器注入 public MovieService(IMovieDao movieDao) { this._movieDao = movieDao; }
/// <summary> /// Singleton implementation /// </summary> /// <returns> an instance of a movie data access object </returns> public static IMovieDao GetInstance() { return(_instance ?? (_instance = new MovieDao())); }
/// <summary> /// /// </summary> /// <param name="movieDao"></param> public MovieBase(IMovieDao movieDao) { _movieDao = movieDao; }
public MovieController(IMovieDao dao) { this.dao = dao; }
public MovieLogic(IMovieDao movieDao) { this._movieDao = movieDao; _movieCount = movieDao.GetAll().Count(); }
public MovieRepository(IMovieDao movieDao, IMovieFactory movieFactory) { _movieDao = movieDao; _movieFactory = movieFactory; }
public ServiceFacade() { cDao = AbstractDaoFactory.getFactory().getCommentDao(); mDao = AbstractDaoFactory.getFactory().getMovieDao(); uDao = AbstractDaoFactory.getFactory().GetUserDao(); }
private ServiceFacade() { userDao = DaoFactory.getFactory().getUserDao(dataModelContainer); movieDao = DaoFactory.getFactory().getMovieDao(dataModelContainer); commentDao = DaoFactory.getFactory().getCommentDao(dataModelContainer); }