Exemplo n.º 1
0
 /// <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);
 }
 /// <summary>
 /// Initializes a new instance of DesignTimeReadOnlyRepository class.
 /// </summary>
 /// <param name="unitOfWork">Owner unit of work that provides context for repository entities.</param>
 public DesignTimeReadOnlyRepository(DesignTimeUnitOfWork unitOfWork)
     : base(CreateSampleQueryable())
 {
     this.unitOfWork = unitOfWork;
 }