Pick any type from your Example.Data project, and use that as T. On 12/14/09, William Chang <[email protected]> wrote: > I don't know what assembly that contains the type T to add to > AddFromAssemblyOf<T>. I have a project called "Example.Data". Inside > the project, I have a folder called "Entities" and another folder > called "Mappings". > > For your information, I'm following most of "Getting started" wiki, > except that I'm implementing ASPNET MVC. I setup a static class called > "OrmStarter" (a layer for NHibernate and Fluent) in my > "Example.Data.Core" project and it contains a method, "private static > NHibernate.ISessionFactory CreateSessionFactory" for configuration. My > other project called "Example.Data.Tests" is going to call > "OrmStarter" to start the NUnit tests. > > I'm confuse because I don't know what to put into T for > "AddFromAssemblyOf" for my "CreateSessionFactory", to get all the > mappings at once? > > Thank you for your help. > > On Dec 14, 11:36 am, James Gregory <[email protected]> wrote: >> The method AddFromAssemblyOf<T> is exactly what you need, I'm not sure >> where the confusion is coming from. That method adds all the fluent >> mappings from the assembly that contains the type T. >> >> On 12/14/09, Hudson Akridge <[email protected]> wrote: >> >> >> >> > Not quite sure what the problem you're having is. >> >> >http://wiki.fluentnhibernate.org/Fluent_configuration#Exclusively_fluent >> >> > <http://wiki.fluentnhibernate.org/Fluent_configuration#Exclusively_fluent>That >> > didn't help you do a fluent configuration from an assembly? >> >> > On Mon, Dec 14, 2009 at 10:32 AM, William Chang >> > <[email protected]>wrote: >> >> >> Reading the wiki (http://wiki.fluentnhibernate.org/ >> >> Fluent_configuration), it didn't explain how to do >> >> "FluentMappings.AddFromAssemblyOf" to find all fluent mappings within >> >> a namespace, automatically? >> >> >> For example, something like "System.Reflection.Assembly.Load >> >> ("Example.Data")" >> >> >> I don't want to add each fluent mapping manually to >> >> Fluently.Configure. >> >> >> Please help! >> >> >> Thanks >> >> >> -- >> >> >> You received this message because you are subscribed to the Google >> >> Groups >> >> "Fluent NHibernate" group. >> >> To post to this group, send email to >> >> [email protected]. >> >> To unsubscribe from this group, send email to >> >> [email protected]<fluent-nhibernate%2Bunsubscr >> >> [email protected]> >> >> . >> >> For more options, visit this group at >> >>http://groups.google.com/group/fluent-nhibernate?hl=en. >> >> > -- >> > - Hudson >> >http://www.bestguesstheory.com >> >http://twitter.com/HudsonAkridge >> >> > -- >> >> > You received this message because you are subscribed to the Google >> > Groups >> > "Fluent NHibernate" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> >http://groups.google.com/group/fluent-nhibernate?hl=en. > > -- > > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/fluent-nhibernate?hl=en. > > >
-- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.
