public Column ( string columnName ) : |
||
columnName | string | The column name as it exists in the database. |
Résultat |
public void PropertyMap_Column_Sets_ColumnName_But_Does_Not_Change_Name() { Expression<Func<Foo, object>> expression = f => f.Baz; var pi = ReflectionHelper.GetProperty(expression) as PropertyInfo; PropertyMap pm = new PropertyMap(pi); pm.Column("X"); Assert.AreEqual("Baz", pm.Name); Assert.AreEqual("X", pm.ColumnName); }
public void PropertyMap_Key_Sets_KeyType() { Expression<Func<Foo, object>> expression = f => f.Baz; var pi = ReflectionHelper.GetProperty(expression) as PropertyInfo; PropertyMap pm = new PropertyMap(pi); pm.Column("X").Key(KeyType.Identity); Assert.AreEqual("Baz", pm.Name); Assert.AreEqual("X", pm.ColumnName); Assert.AreEqual(KeyType.Identity, pm.KeyType); }