C# Nhibernate ConnectionProvider.cs cannot be found -


i trying setup nhibernate oracle database far have following:

app.config (ive commented out username , password protection):

    <?xml version="1.0" encoding="utf-8" ?> <configuration>   <configsections>     <section name="hibernate-configuration" type="nhibernate.cfg.configurationsectionhandler, nhibernate"/>   </configsections>   <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">     <session-factory>       <property name="connection.provider">nhibernate.connection.driverconnectionprovider</property>       <property name="dialect">nhibernate.dialect.oracle10gdialect</property>       <property name="query.substitutions">hqlfunction=sqlfunc</property>       <property name="connection.driver_class">nhibernate.driver.oracledataclientdriver</property>       <property name="connection.connection_string">data source=ctir;persist security info=true;user id=****;password=****;unicode=true</property>       <property name="show_sql">true</property>       <mapping assembly="testnhibernate" />     </session-factory>   </hibernate-configuration> </configuration> 

agenter.cs:

    using system; using system.collections.generic; using system.linq; using system.text;  namespace testnhibernate {     class agenter     {         public virtual int id {get; set;}         public virtual string initialer { get; set; }         public virtual string fornavn { get; set; }         public virtual string efternavn { get; set; }      } } 

agenter_liste.hbm.xml:

    <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="testnhibernate" namespace="testnhibernate">   <class name="agenter">     <id name="id" column="id">       <generator class="identity" />     </id>     <property name="initialer" />     <property name="fornavn" />     <property name="efternavn" />   </class> </hibernate-mapping> 

form1.cs:

    using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.windows.forms; using nhibernate.cfg; using nhibernate;  namespace testnhibernate {      public partial class form1 : form     {         private configuration myconfig;         private isessionfactory mysessionfactory;         private isession mysession;         public form1()         {             initializecomponent();         }          private void form1_load(object sender, eventargs e)         {             myconfig = new configuration();             myconfig.configure();             mysessionfactory = myconfig.buildsessionfactory(); <--- goes wrong             mysession = mysessionfactory.opensession();              using (mysession.begintransaction())             {                 agenter agent = new agenter {fornavn = "marc", initialer = "mrcr212", id = 999, efternavn = "rasmussen" };                 mysession.save(agent);                 mysession.transaction.commit();             }         }     } } 

i following error:

could not create driver nhibernate.driver.oracledataclientdriver. 

what missing?

oracle allows xcopy deployment.

but gotta legwork.

http://dbaportal.eu/2013/02/22/true-xcopy-runtime-for-oracle-odp-net-application/


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -