/// <summary> /// Defines the data entity type identity property (via <see cref="Field"/> object). /// </summary> /// <param name="field">The instance of <see cref="Field"/> object to be mapped.</param> /// <param name="force">A value that indicates whether to force the mapping. If one is already exists, then it will be overwritten.</param> /// <returns>The current instance.</returns> public EntityMapFluentDefinition <TEntity> Identity(Field field, bool force) { IdentityMapper.Add <TEntity>(field, force); return(this); }
/// <summary> /// Defines the data entity type identity property. /// </summary> /// <param name="expression">The expression to be parsed.</param> /// <param name="force">A value that indicates whether to force the mapping. If one is already exists, then it will be overwritten.</param> /// <returns>The current instance.</returns> public EntityMapFluentDefinition <TEntity> Identity(Expression <Func <TEntity, object> > expression, bool force) { IdentityMapper.Add <TEntity>(expression, force); return(this); }
/// <summary> /// Defines the data entity type identity property (via property name). /// </summary> /// <param name="propertyName">The name of the class property to be mapped.</param> /// <param name="force">A value that indicates whether to force the mapping. If one is already exists, then it will be overwritten.</param> /// <returns>The current instance.</returns> public EntityMapFluentDefinition <TEntity> Identity(string propertyName, bool force) { IdentityMapper.Add <TEntity>(propertyName, force); return(this); }
protected IIdentityOptions <T> Identity(Expression <Func <T, object> > expression) { IdentityMapper.Add <T>(expression); return(new IdentityOptions <T>(expression)); }