So what have you tried along with the result? I think it can be done, though I haven't tried myself.
-- Regards, Maximilian Haru Raditya On Fri, Jul 15, 2011 at 5:21 PM, Richard Wilde <[email protected]>wrote: > I am not sure whether I have asked a stupid question, an unanswerable > question or nobody has picked up on this yet...**** > > Can anyone offer any guidance?**** > > Many thanks**** > > ** ** > > ------------------------------------------------**** > > Hi,**** > > ** ** > > I am playing with mapping by code and am wondering about conventions.**** > > ** ** > > All of my mapping files share the same common functionality:-**** > > ** ** > > **1. **All table names are lowercase:-**** > > Table("organisationincometype");**** > > ** ** > > **2. **All Bags have:-**** > > bag.Cascade(Cascade.All | Cascade.DeleteOrphans)**** > > and**** > > bag.BatchSize(10)**** > > and**** > > action => action.OneToMany()**** > > ** ** > > So my question is, is this possible to do via conventions? If so how as I > have seen a couple of posts by Fabio but cannot fathom this out.**** > > ** ** > > My code to configure and build session factory is:-**** > > ** ** > > ** ** > > var mapper = new ModelMapper();**** > > mapper.AddMappings(typeof(Organisation).Assembly.GetTypes());**** > > ** ** > > var configure = new Configuration();**** > > configure.DataBaseIntegration(x =>**** > > {**** > > x.Dialect<MySQL5Dialect>();**** > > x.ConnectionStringName = "db";*** > * > > }).CurrentSessionContext< > WebSessionContext>();**** > > ** ** > > var mapping = mapper.CompileMappingForAllExplicitlyAddedEntities();**** > > configure.AddDeserializedMapping(mapping, "Domain");**** > > ** ** > > SessionFactory = configure.BuildSessionFactory();**** > > ** ** > > ** ** > > Thanks**** > > Rippo**** > > ** ** > > ** ** > > ** ** > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" 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/nhusers?hl=en. > -- You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.
