Created
April 13, 2011 11:37
-
-
Save jagregory/917387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClassMap: ClassMap<MyClass> | |
{ | |
public MyClassMap() | |
{ | |
Id(x => x.Id) | |
.Column("MyClassId") | |
.GeneratedBy.HiLo("100"); | |
Map(x => x.Something) | |
.Length(150); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClassMap: ClassMapping<MyClass> | |
{ | |
public MyClassMap() | |
{ | |
Id(x => x.Id, map => | |
{ | |
map.Column("MyClassId"); | |
map.Generator(Generators.HighLow, gmap => gmap.Params(new { max_low = 100 })); | |
}); | |
Property(x => x.Something, map => map.Length(150)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment