/// <summary> /// Returns true if the given class represents a database table with an identity primary key column, false otherwise /// Default: True if the property representing the primary key is an integer property, false otherwise /// </summary> /// <param name="entityType">The type for which is should be determined if the underlying database table has an identity primary key column</param> /// <returns>True if the given class represents a database table with an identity primary key column, false otherwise</returns> public virtual bool HasIdentityId(Type entityType) { var dataReader = new ConventionReader(this); var idProperty = dataReader.TryGetIdProperty(entityType); return idProperty != null && idProperty.PropertyType == typeof(int); }
/// <summary> /// Returns true if the given class represents a database table with an identity primary key column, false otherwise /// Default: True if the property representing the primary key is an integer property, false otherwise /// </summary> /// <param name="entityType">The type for which is should be determined if the underlying database table has an identity primary key column</param> /// <returns>True if the given class represents a database table with an identity primary key column, false otherwise</returns> public virtual bool HasIdentityId(Type entityType) { var dataReader = new ConventionReader(this); var idProperty = dataReader.TryGetIdProperty(entityType); return(idProperty != null && idProperty.PropertyType == typeof(int)); }
public void SetUp() { var convention = new TestingConvention(); _reader = new ConventionReader(convention); }