Exemple #1
0
 /// <summary>
 /// Adds mapping attribute to a member, specified using lambda expression.
 /// </summary>
 /// <param name="func">Target member, specified using lambda expression.</param>
 /// <param name="attribute">Mapping attribute to add to specified member.</param>
 /// <returns>Returns current fluent entity mapping builder.</returns>
 public EntityMappingBuilder <TEntity> HasAttribute(Expression <Func <TEntity, object?> > func, MappingAttribute attribute)
 {
     _builder.HasAttribute(func, attribute);
     _builder.MappingSchema.ResetID();
     return(this);
 }
Exemple #2
0
 /// <summary>
 /// Adds mapping attribute to a member, specified using lambda expression.
 /// </summary>
 /// <param name="func">Target member, specified using lambda expression.</param>
 /// <param name="attribute">Mapping attribute to add to specified member.</param>
 /// <returns>Returns current fluent entity mapping builder.</returns>
 public EntityMappingBuilder <TEntity> HasAttribute(LambdaExpression func, MappingAttribute attribute)
 {
     _builder.HasAttribute(func, attribute);
     _builder.MappingSchema.ResetID();
     return(this);
 }
Exemple #3
0
 /// <summary>
 /// Adds mapping attribute to current entity.
 /// </summary>
 /// <param name="attribute">Mapping attribute to add.</param>
 /// <returns>Returns current fluent entity mapping builder.</returns>
 public EntityMappingBuilder <TEntity> HasAttribute(MappingAttribute attribute)
 {
     _builder.HasAttribute(typeof(TEntity), attribute);
     _builder.MappingSchema.ResetID();
     return(this);
 }
Exemple #4
0
 /// <summary>
 /// Adds mapping attribute to specified member.
 /// </summary>
 /// <param name="memberInfo">Target member.</param>
 /// <param name="attribute">Mapping attribute to add to specified member.</param>
 /// <returns>Returns current fluent entity mapping builder.</returns>
 public EntityMappingBuilder <TEntity> HasAttribute(MemberInfo memberInfo, MappingAttribute attribute)
 {
     _builder.HasAttribute(memberInfo, attribute);
     _builder.MappingSchema.ResetID();
     return(this);
 }
 /// <summary>
 /// Adds attribute to current mapping member.
 /// </summary>
 /// <param name="attribute">Mapping attribute to add to specified member.</param>
 /// <returns>Returns current column or association mapping builder.</returns>
 public PropertyMappingBuilder <TEntity, TProperty> HasAttribute(MappingAttribute attribute)
 {
     _entity.HasAttribute(_memberInfo, attribute);
     return(this);
 }