NHibernate (UoW) + cCommand pattern I'm building an ASP.NET MVC app and would like some feedback for my way to query/execute statements to the ORM.

I'm using Fluent NHibernate, and have mixed the UoW provided by NHibernate with a Command pattern.

ICommand.cs (Core layer)

using NHibernate;

namespace MyDemon.Core.Commands
{
    public interface ICommand&lt;out TResult&gt;
    {
        TResult Execute(ISession session);
    }
}


ISessionExtensions.cs (Core layer)

using NHibernate;

namespace MyDemon.Core.Commands
{
    public static class ISessionExtensions
    {
        public static TResult Execute&lt;TResult&gt;(this ISession session, ICommand&lt;TResult&gt; unitOfWork)
        {
            return unitOfWork.Execute(session);
        }
    }
}


GetUserById.cs (Core layer)

using NHibernate;

namespace MyDemon.Core.Commands.User
{
    using Entities;

    public class GetUserById : ICommand&lt;User&gt;
    {
        public int UserId { get; set; }

        public GetUserById(int userId)
        {
            UserId = userId;
        }

        #region Implementation of IUnitOfWork&lt;out User&gt;

        public User Execute(ISession session)
        {
            return session.Get&lt;User&gt;(UserId);
        }

        #endregion
    }
}


AccountController.cs (Web layer)

[AjaxOnly]
[Authorize]
public ActionResult Details(int id)
{
    User userToGet = _session.Execute(new GetUserById(id));

    if (userToGet == null)
    {
        return PartialView("Partials/UserNotFound");
    }

    DetailsUserViewModel userToViewModel = Mapper.Map&lt;User, DetailsUserViewModel&gt;(userToGet);

    return PartialView("Partials/Details", userToViewModel);
}


What do you think? A clever design, or just another "too-much code" approach?
This seems to be a lot of code to say the same as this:

[AjaxOnly]
[Authorize]
public ActionResult Details(int id)
{
    User userToGet = _session.Get&lt;User&gt;(id);

    if (userToGet == null)
    {
        return PartialView("Partials/UserNotFound");
    }

    DetailsUserViewModel userToViewModel = Mapper.Map&lt;User, DetailsUserViewModel&gt;(userToGet);

    return PartialView("Partials/Details", userToViewModel);
}


What problem are you trying to solve here?

(or am I missing something?)