nHibernate Example

Jul 28, 2010 at 4:54 PM

Hello

the implementation of the nHibernate Repository seems to be missing in the source code is there any plans to include it.

plus I cannot seem to find any WCF code apart from the service contract where are the endpoints defined?

Karrim 

Aug 13, 2010 at 5:06 PM

I was hoping to find the NHibernate repository too :o(

Coordinator
Sep 2, 2010 at 12:40 PM

I have structure the project in chapters so I did not have to have the whole solution in place before I could publish some articles. The latest code at this stage (Chapter X) is still dealing with the basics in the WPF client. I would need a couple weeks before I can revise the server code and start with the NHibernate implementation. I would say to check the project in four weeks time to see if the NHibernate repositories are in place. In many ways the NHibernate repository is quite straight forward, as an advance:

    public class RepositoryNh<TEntity>
        :IRepository<TEntity>
    {
        public ISession Session { get; private set; }

        public RepositoryNh(ISession session)
        {
            Session = session;
        }

        #region Implementation of IRepository<TEntity>

        public IQueryable<TEntity> FindAll()
        {
            return Session.Linq<TEntity>();
        }

        public TEntity GetById(Int64 id)
        {
            return Session.Get<TEntity>(id);
        }

        public TEntity Save(TEntity instance)
        {
            Session.Save(instance);
            return instance;
        }

        public void Update(TEntity instance)
        {
            Session.Update(instance);
        }

        public void Remove(TEntity instance)
        {
            Session.Delete(instance);
        }

        #endregion
    }

Please, notice that other additional components need to be in place before the above code can be used.

Coordinator
Sep 9, 2010 at 1:52 PM

The NHibernate code is now available.

Sep 9, 2010 at 9:30 PM
thank you


From: [email removed]
To: [email removed]
Date: Thu, 9 Sep 2010 05:52:29 -0700
Subject: Re: nHibernate Example [wcfbyexample:221717]

From: ealbert
The NHibernate code is now available.
Read the full discussion online.
To add a post to this discussion, reply to this email (wcfbyexample@discussions.codeplex.com)
To start a new discussion for this project, email wcfbyexample@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com