I guess you are using 2.0 versions and it doesn't have "hibernate.dialect"
thing. New versions use "dialect" only.

Tuna Toksöz
http://turkiyealt.net
http://tunatoksoz.com
http://twitter.com/tehlike

Typos included to enhance the readers attention!



On Sun, Feb 15, 2009 at 11:42 AM, Peter Morris <[email protected]> wrote:

>
> Hi all.  I'm working through the first example in "NHibernate in
> Action" and guess what?  It doesn't work!
>
> using System;
> using System.Collections.Generic;
> using System.Linq;
> using System.Text;
> using NHibernate;
> using NHibernate.Cfg;
> using ConsoleApplication30.Model;
>
> namespace ConsoleApplication30
> {
>        class Program
>        {
>                static ISessionFactory Factory;
>
>                static void Main(string[] args)
>                {
>                        Employee fred = new Employee();
>                        fred.Name = "Fred Bloggs";
>
>                        using (var session = OpenSession())
>                        {
>                                using (var transaction =
> session.BeginTransaction())
>                                {
>                                        session.Save(fred);
>                                        transaction.Commit();
>                                }//transaction
>                        }//using session
>
>                        Console.WriteLine(fred.SayHello());
>                        Console.ReadLine();
>                }
>
>                static ISession OpenSession()
>                {
>                        if (Factory == null)
>                        {
>                                var configuration = new Configuration();
>
>  configuration.AddAssembly(typeof(Employee).Assembly);
>                                Factory =
> configuration.BuildSessionFactory();
>                        }
>                        return Factory.OpenSession();
>                }
>
>        }
> }
>
> System.InvalidOperationException was unhandled
>  Message="Could not find the dialect in the configuration"
>  Source="NHibernate"
>  StackTrace:
>       at NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props)
>       at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2
> properties)
>       at NHibernate.Cfg.Configuration.BuildSettings()
>       at NHibernate.Cfg.Configuration.BuildSessionFactory()
>       at ConsoleApplication30.Program.OpenSession() in C:\temp
> \TempProjects
> \ConsoleApplication30\ConsoleApplication30\Program.cs:line 39
>       at ConsoleApplication30.Program.Main(String[] args) in C:\temp
> \TempProjects
> \ConsoleApplication30\ConsoleApplication30\Program.cs:line 20
>       at System.AppDomain._nExecuteAssembly(Assembly assembly, String
> [] args)
>       at System.AppDomain.ExecuteAssembly(String assemblyFile,
> Evidence assemblySecurity, String[] args)
>       at
> Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
>       at System.Threading.ThreadHelper.ThreadStart_Context(Object
> state)
>       at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state)
>       at System.Threading.ThreadHelper.ThreadStart()
>  InnerException:
>
>
> Is there a new additional step required or something?
>
> Any help would be appreciated!
>
>
> Thanks
>
> Pete
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to