コード例 #1
0
ファイル: UsersService.cs プロジェクト: Milen-Tanev/BikeTrips
        public UsersService(IBikeTripsDbRepository <User> users, IUnitOfWork unitOfWork)
        {
            Guard.ThrowIfNull(users, "Users");
            Guard.ThrowIfNull(unitOfWork, "Unit of work");

            this.users      = users;
            this.unitOfWork = unitOfWork;
        }
コード例 #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;
        }