Nikola, that sounds terrific - I'm sure many people will benefit.
Have not downloaded it yet, because I've got some momentum again
(mainly thanks to Paul's test project), and am starting to think this
may work out after all.
But I'll take a look, and contribute if I can. One trivial possibility
- to create the mappings directory, I just added the following:
// Automapped XML files will be exported to project's
// ...\bin\x86\Debug\AutoMapExport directory
// See ".ExportTo()" below
const string autoMapExportDir = "AutoMapExport";
if (!Directory.Exists(autoMapExportDir))
Directory.CreateDirectory(autoMapExportDir);
Hope to add something more substantial in the future.
I also like that you are setting it up to work with SQL Server
Express, because that will allow us to browse the created tables with
VS2008's Server Explorer SQL Server Managment Studio, which are more
familiar than SQLite.
-Tom
On Nov 3, 2:44 pm, malovicn <[email protected]> wrote:
> I've started a small project doing what you've asked for: small sample
> demoing the fnh concepts "in action"http://fnhsamples.codeplex.com/
>
> I just started it (there would be much more code there in the future),
> but it has already initial auto mapping example so go check it out and
> I hope it could be of some help to you.
>
> Nikola
>
> On Nov 2, 11:19 pm, Mikael Henriksson <[email protected]> wrote:
>
>
>
> > I am sorry if I offend someone but trying to ask for a solution is like
> > trying to ask someone to do it for you. You'll get by with a bunch of
> > imagination and a lot of google-foo!!!!
>
> > On Mon, Nov 2, 2009 at 11:10 PM, James Gregory
> > <[email protected]>wrote:
>
> > > Automapping has existed for as long as fluent nhibernate has, there's no *
> > > new* about it.
>
> > > If you're having issues, you should ask for help. We're here to help. It's
> > > much easier for us to answer a quick question on the mailing list than it
> > > is
> > > to create another example project. Sure, we should do that, but when our
> > > time is limited and it's between fixing a bug or creating more examples,
> > > bugs will always win. That being said, I truly don't believe it's that
> > > difficult to use it. I'm interested to know what troubles you had.
>
> > > Getting the Example.FirstProject to use the automapper should be as simple
> > > as changing the CreateSessionFactory method to be something like this:
>
> > > private static ISessionFactory CreateSessionFactory()
> > > {
> > > var mappings = AutoMap.AssemblyOf<Product>()
> > > .Where(t => t.Namespace ==
> > > "Examples.FirstProject.Entities");
>
> > > return Fluently.Configure()
> > > .Database(SQLiteConfiguration.Standard
> > > .UsingFile(DbFile))
> > > .Mappings(m =>
> > > m.AutoMappings.Add(mappings))
> > > .ExposeConfiguration(BuildSchema)
> > > .BuildSessionFactory();
> > > }
>
> > > On Mon, Nov 2, 2009 at 10:01 PM, tbushell <[email protected]> wrote:
>
> > >> Thanks James - I'm aware of that page, but my experience over the last
> > >> few days with trying to pull various NHibernate code fragments into a
> > >> working whole has been notably unsuccessful.
>
> > >> For developers who are new to the whole process such as myself, we
> > >> really need to start with something that already works. Otherwise,
> > >> it's been my experience that I just get a seemingly never ending
> > >> series of exceptions, with no idea what they mean, or how to fix them.
>
> > >> Something like the Examples.FirstProject, but with Automapping - would
> > >> be great - I'm surprised someone has not already added it to the
> > >> source. Or is this just too new for that level of sample code?
>
> > >> -Tom
>
> > >> On Nov 2, 4:29 pm, James Gregory <[email protected]> wrote:
> > >> >http://wiki.fluentnhibernate.org/Auto_mapping-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---