Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to add primary key to component table with Nhibernate?
- public class Address
- {
- public int Number { get; set; }
- public string Street { get; set; }
- public string City { get; set; }
- public string PostCode { get; set; }
- }
- public class Person
- {
- public int Id { get; set; }
- public Address Address { get; set; }
- }
- public PersonMap()
- {
- Id( x => x.Id );
- Component(x => x.Address, m =>
- {
- m.Map(x => x.Number);
- m.Map(x => x.Street);
- m.Map(x => x.City);
- m.Map(x => x.PostCode);
- });
- }
Add Comment
Please, Sign In to add comment