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; var pm = new PropertyMap(pi); pm.Column("X"); Assert.Equal("Baz", pm.Name); Assert.Equal("X", pm.ColumnName); }
public void PropertyMap_Key_Sets_KeyType() { Expression <Func <Foo, object> > expression = f => f.Baz; var pi = ReflectionHelper.GetProperty(expression) as PropertyInfo; var pm = new PropertyMap(pi); pm.Column("X").Key(KeyType.Identity); Assert.Equal("Baz", pm.Name); Assert.Equal("X", pm.ColumnName); Assert.Equal(KeyType.Identity, pm.KeyType); }
public void PropertyMap_Column_Sets_ColumnName_But_Does_Not_Change_Name() { Expression <Func <Foo, object> > expression = f => f.Baz; var pi = ReflectionUtils.GetProperty(expression) as PropertyInfo; var pm = new PropertyMap(pi); pm.Column("X"); //pm.Name.ShouldBe("Baz"); //pm.ColumnName.ShouldBe("X"); }
public void PropertyMap_Key_Sets_KeyType() { Expression <Func <Foo, object> > expression = f => f.Baz; var pi = ReflectionUtils.GetProperty(expression) as PropertyInfo; var pm = new PropertyMap(pi); pm.Column("X").Key(KeyType.Identity); //pm.Name.ShouldBe("Baz"); //pm.ColumnName.ShouldBe("X"); //pm.KeyType.ShouldBe(KeyType.Identity); }
public IdOptions Column(string columnName) { _property.Column(columnName); return(this); }