Example #1
0
        public UsersService(IBikeTripsDbRepository <User> users, IUnitOfWork unitOfWork)
        {
            Guard.ThrowIfNull(users, "Users");
            Guard.ThrowIfNull(unitOfWork, "Unit of work");

            this.users      = users;
            this.unitOfWork = unitOfWork;
        }
Example #2
0
        public CommentsService(IBikeTripsDbRepository <Comment> comments,
                               IBikeTripsDbRepository <Trip> trips,
                               IUserService users,
                               IIdentifierProvider identifierProvider,
                               IUnitOfWork unitOfWork)
        {
            Guard.ThrowIfNull(comments, "Comments");
            Guard.ThrowIfNull(trips, "Trips");
            Guard.ThrowIfNull(users, "Users");
            Guard.ThrowIfNull(identifierProvider, "Identifier provider");
            Guard.ThrowIfNull(unitOfWork, "Unit of work");

            this.comments           = comments;
            this.trips              = trips;
            this.users              = users;
            this.identifierProvider = identifierProvider;
            this.unitOfWork         = unitOfWork;
        }