Search Results for

    Show / Hide Table of Contents

    Interface ILeftRelationBuilder<TEntity>

    This interface hosts relation methods for the left side of a relation.

    Namespace: Venflow.Modeling.Definitions.Builder
    Assembly: Venflow.dll
    Syntax
    public interface ILeftRelationBuilder<TEntity>
        where TEntity : class, new()
    Type Parameters
    Name Description
    TEntity

    The entity type being configured.

    Methods

    | Improve this Doc View Source

    HasMany<TRelation>()

    Configures a relationship where this entity type has a collection that contains instances of the other type in the relationship.

    Note that calling this method will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

    After calling this method, you should chain a call to WithOne(Expression<Func<TRelation, TEntity>>) to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

    Declaration
    IRequiredSingleRightRelationBuilder<TEntity, TRelation> HasMany<TRelation>()
        where TRelation : class
    Returns
    Type Description
    IRequiredSingleRightRelationBuilder<TEntity, TRelation>

    An object that can be used to configure the relationship.

    Type Parameters
    Name Description
    TRelation

    The entity type that this relationship targets.

    | Improve this Doc View Source

    HasMany<TRelation>(Expression<Func<TEntity, IList<TRelation>>>)

    Configures a relationship where this entity type has a collection that contains instances of the other type in the relationship.

    Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

    After calling this method, you should chain a call to WithOne() to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

    Declaration
    INotRequiredSingleRightRelationBuilder<TEntity, TRelation> HasMany<TRelation>(Expression<Func<TEntity, IList<TRelation>>> navigationProperty)
        where TRelation : class
    Parameters
    Type Name Description
    Expression<Func<TEntity, IList<TRelation>>> navigationProperty
    Returns
    Type Description
    INotRequiredSingleRightRelationBuilder<TEntity, TRelation>

    An object that can be used to configure the relationship.

    Type Parameters
    Name Description
    TRelation

    The entity type that this relationship targets.

    | Improve this Doc View Source

    HasOne<TRelation>()

    Configures a relationship where this entity type has a reference that points to a single instance of the other type in the relationship.

    Note that calling this method will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

    After calling this method, you should chain a call to WithMany(Expression<Func<TRelation, IList<TEntity>>>) or WithOne(Expression<Func<TRelation, TEntity>>) to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

    Declaration
    IRequiredMultiRightRelationBuilder<TEntity, TRelation> HasOne<TRelation>()
        where TRelation : class
    Returns
    Type Description
    IRequiredMultiRightRelationBuilder<TEntity, TRelation>

    An object that can be used to configure the relationship.

    Type Parameters
    Name Description
    TRelation

    The entity type that this relationship targets.

    | Improve this Doc View Source

    HasOne<TRelation>(Expression<Func<TEntity, TRelation>>)

    Configures a relationship where this entity type has a reference that points to a single instance of the other type in the relationship.

    Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

    After calling this method, you should chain a call to WithMany() or WithOne() to fully configure the relationship. Calling just this method without the chained call will not produce a valid relationship.

    Declaration
    INotRequiredMultiRightRelationBuilder<TEntity, TRelation> HasOne<TRelation>(Expression<Func<TEntity, TRelation>> navigationProperty)
        where TRelation : class
    Parameters
    Type Name Description
    Expression<Func<TEntity, TRelation>> navigationProperty

    A lambda expression representing the reference navigation property on this entity type that represents the relationship (post => post.Blog). If no property is specified, the relationship will be configured without a navigation property on this end.

    Returns
    Type Description
    INotRequiredMultiRightRelationBuilder<TEntity, TRelation>

    An object that can be used to configure the relationship.

    Type Parameters
    Name Description
    TRelation

    The entity type that this relationship targets.

    Theme

    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 Twenty