Hi Masters!
I try to understand my problem but finally after googling many times, i couldn't find out the solution.
My problem is:
I create a project using WCF service library template.
Add reference to Nhibernate dll.
Add using Nhibernate to the code
and try to add the following code
NHibernate.Cfg.Configuration config = new NHibernate.Cfg.Configuration();
ISessionFactory sessionFactory = config.BuildSessionFactory();
ISession session = sessionFactory.OpenSession();
Finally i build it with Error
The type or namespace name 'NHibernate' could not be found (are you missing a using directive or an assembly reference?)
Below is the code of my service class
using System
using System.Collections.Generic
using System.Linq
using System.Runtime.Serialization
using System.ServiceModel
using System.Text
using NHibernate
namespace WcfServiceLibrary1
{
public class Service1 : IService1
{
public string GetData(int value)
{
return string.Format("You entered: {0}", value)
}
public CompositeType GetDataUsingDataContract(CompositeType composite)
{
if (composite == null)
{
throw new ArgumentNullException("composite")
}
if (composite.BoolValue)
{
composite.StringValue += "Suffix"
}
return composite
}
public void GetDataFromNhibernate()
{
NHibernate.Cfg.Configuration config = new NHibernate.Cfg.Configuration()
ISessionFactory sessionFactory = config.BuildSessionFactory()
ISession session = sessionFactory.OpenSession()
}
}
}
I don't know why. Can anyone help me?
THanks