Example #1
0
 public DesignTimeReadOnlyRepository(DesignTimeUnitOfWork unitOfWork)
     : base(CreateSampleQueryable())
 {
     this.unitOfWork = unitOfWork;
 }
 /// <summary>
 /// Initializes a new instance of the DesignTimeRepository class.
 /// </summary>
 /// <param name="getPrimaryKeyExpression">A lambda-expression that returns the entity primary key.</param>
 public DesignTimeRepository(DesignTimeUnitOfWork unitOfWork, Expression <Func <TEntity, TPrimaryKey> > getPrimaryKeyExpression)
     : base(unitOfWork)
 {
     this.getPrimaryKeyExpression = getPrimaryKeyExpression;
     this.entityTraits            = ExpressionHelper.GetEntityTraits(this, getPrimaryKeyExpression);
 }