IMapping mapping = Mapping.For<Product>() .Identity("Id") .Property("Name") .Property("Price") .Map();
IMapping mapping = Mapping.For<Product>() .Identity("Id", "product_id", Access.NoSetterCamelcaseUnderscore, Generator.Native) .Property("Name", "product_name", false) .Property("Price", false) .Map();
public IPropertySpecificationPredicate Property(string name);public IPropertySpecificationPredicate Property(string name, string columnName);public IPropertySpecificationPredicate Property(string name, string columnName, DbType type);public IPropertySpecificationPredicate Property(string name, string columnName, DbType type, int length);public IPropertySpecificationPredicate Property(string name, string columnName, bool nullable);...
IMapping mapping = Mapping.For<Product>() .Identity("Id") .Column("product_id") .Generator(Generator.Native) .Map();
IMapping mapping = Mapping.For<Product>() .Identity("Id") .Column("product_id") .Generator(Generator.Native) .AndProperty("Name") .Nullable(false) .Map();
IMapping mapping = Mapping.For<Product>() .Identity("Id", delegate(Identity i) { i.column = "product_id"; i.generator = Generator.Native; }) .AndProperty("Name", delegate(Property p) { p.column = "product_name"; p.nullable = false; }) .Map();
I'm Ben Scheirman. I am a .NET software developer with a strong interest in agility. I work as a Principal Consultant with Sogeti.
Read more here.
email me
Ads by The Lounge
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.