Fluently.Configure()
... .ExposeConfiguration(c => { var persistentClass = c.GetClassMapping("MyApp.Models.User");
// Create the component var component = new Component(persistentClass);
// Add the "Name" property var simpleValue = new SimpleValue(persistentClass.Table) { TypeName = "String" };
simpleValue.AddColumn(new Column("Name") { Value = simpleValue, Length = 100, IsNullable = true });
component.AddProperty(new Property() { Name = "Name", Value = simpleValue });
// Add the "Email" property var simpleValue2 = new SimpleValue(persistentClass.Table) { TypeName = "String" };
simpleValue2.AddColumn(new Column("Email") { Value = simpleValue2, Length = 100, IsNullable = true });
component.AddProperty(new Property() { Name = "Email", Value = simpleValue2 });
// Add the component persistentClass.AddProperty(new Property() { Name = "Attributes", Value = component }); }) .BuildConfiguration();
session.Get<User>().Attributes["Email"]
--
---
You received this message because you are subscribed to the Google Groups "nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhibernate-develo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to nhibernate-development+unsub...@googlegroups.com.
An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects.
Organizational License. If you are an organization, your users may use the software as follows:
Any number of your users may use the software to develop and test applications released under Open Source Initiative (OSI) approved open source software licenses.