예제 #1
0
 protected override void OnBuildMap(MappingContext mappingContext)
 {
     mappingContext.Map <Person>()
     .ToTable("people");
     mappingContext.Map <Person>()
     .Member(person => person.Id)
     .HasName("id")
     .IsPrimaryKey();
     mappingContext.Map <Person>()
     .Member(person => person.FirstName)
     .HasName("first_name")
     .IsNotNull();
 }
예제 #2
0
 protected override void OnBuildMap(MappingContext mappingContext)
 {
     mappingContext.Map<Person>()
         .ToTable("people");
     mappingContext.Map<Person>()
         .Member(person => person.Id)
         .HasName("id")
         .IsPrimaryKey();
     mappingContext.Map<Person>()
         .Member(person => person.FirstName)
         .HasName("first_name")
         .IsNotNull();
 }