コード例 #1
0
 protected MongoRepository(
     IMongoSessionContext dbContext,
     IAggregateMapper <TAggregate, TDocument, TId> mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
コード例 #2
0
        private readonly IDataService _service; //  Data service for accessing Aggregates

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Ctor: Accepts injected dataservice
        /// </summary>
        /// <param name="dataService">The DataService instance being injected</param>
        /// <param name="aggregateMapper">The mapper instance</param>
        public TurbineController(IDataService dataService, IAggregateMapper aggregateMapper, ITurbineLinkGenerator generator)
        {
            if (dataService == null)
                throw new ArgumentNullException("dataService", "No valid dataservice supplied to the controller.");
            if (aggregateMapper == null)
                throw new ArgumentNullException("aggregateMapper", "No valid mapper class supplied to the controller.");
            if (generator == null)
                throw new ArgumentNullException("generator", "No valid link generator supplied to the controller.");

            _service = dataService;
            _mapper = aggregateMapper;
            _generator = generator;
        }
コード例 #3
0
 public AppointmentRepository(IMongoSessionContext sessionContext, IAggregateMapper <Appointment, AppointmentDocument, Guid> mapper) : base(sessionContext, mapper)
 {
 }
コード例 #4
0
 public PatientRepository(IMongoSessionContext sessionContext, IAggregateMapper <Patient, PatientDocument, Guid> mapper) : base(sessionContext, mapper)
 {
 }