Пример #1
0
 public EntityMaterializationExpression UpdateIdentityMapMode(IdentityMapMode identityMapMode)
 {
     return(new EntityMaterializationExpression(
                EntityType,
                identityMapMode,
                KeyExpression,
                ShadowProperties,
                Properties,
                Expression,
                IncludedNavigations));
 }
Пример #2
0
 public EntityMaterializationExpression(
     IEntityType entityType,
     IdentityMapMode identityMapMode,
     Expression keyExpression,
     IEnumerable <IProperty> shadowProperties,
     IEnumerable <Expression> shadowPropertyExpressions,
     Expression expression,
     IEnumerable <INavigation> includedNavigations = null)
     : base(expression)
 {
     EntityType          = entityType ?? throw new ArgumentNullException(nameof(entityType));
     IdentityMapMode     = identityMapMode;
     KeyExpression       = keyExpression ?? throw new ArgumentNullException(nameof(keyExpression));
     ShadowProperties    = shadowProperties.ToImmutableArray();
     IncludedNavigations = includedNavigations?.ToImmutableArray() ?? ImmutableArray.Create <INavigation>();
     Names      = new ReadOnlyCollection <string>(shadowProperties.Select(p => p.Name).ToArray());
     Properties = new ReadOnlyCollection <Expression>(shadowPropertyExpressions.ToArray());
 }