NavigationBuilder Error

Topics: Administration, General
Feb 19, 2014 at 12:44 PM
Edited Feb 19, 2014 at 12:45 PM
I am trying to create Navigation on the basis of current user. let say if current user is not administrator built some other menu for my module. I am getting error on this line
 var CurrentUser = _userRolesRepository.Table.Fetch(p => p.UserId == _requestContextAccessor.Value.GetWorkContext().CurrentUser.Id);
Error   1   The type 'System.Web.Http.Controllers.HttpControllerContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.   E:\Personal\My Project\Club Management System\Source\Orchard.Source.1.7.2\src\Orchard.Web\Modules\Orchard.Club\AdminMenu.cs 39  12  Orchard.Club
My Code for AdminMenu.cs
using Orchard.Data;
using Orchard.Environment;
using Orchard.Localization;
using Orchard.Roles.Models;
using Orchard.Security;
using Orchard.UI.Navigation;
using System.Web.Routing;

namespace Orchard.Club
{
    public class AdminMenu : INavigationProvider
    {
        private readonly Work<RequestContext> _requestContextAccessor;
        private readonly IRepository<UserRolesPartRecord> _userRolesRepository;
        
        public string MenuName
        {
            get { return "admin"; }
        }

        public AdminMenu(Work<RequestContext> requestContextAccessor, IRepository<UserRolesPartRecord> userRolesRepository)
        {
            _requestContextAccessor = requestContextAccessor;
            T = NullLocalizer.Instance;
            _userRolesRepository = userRolesRepository;
        }
 

        public AdminMenu()
        {
            T = NullLocalizer.Instance;
        }

        private Localizer T { get; set; }

        public void GetNavigation(NavigationBuilder builder)
        {            
            //get current user role and create navigation on the basis of it. 
           var CurrentUser = _userRolesRepository.Table.Fetch(p => p.UserId == _requestContextAccessor.Value.GetWorkContext().CurrentUser.Id);
            
                        

            // "Webshop"
            builder.Add(item => item

                .Caption(T("Courses"))
                .Position("2")
                .Action("Index", "CourseAdmin", new { area = "Orchard.Club" })
                .Permission(StandardPermissions.SiteOwner)
            );

            // "Webshop"
            builder.Add(item => item
                .Caption(T("Members"))
                .Position("3")
                .Action("Index", "CustomerAdmin", new { area = "Orchard.Club" })
                .Permission(StandardPermissions.SiteOwner)
            );
            // "Webshop"
            builder.Add(item => item

                .Caption(T("My Courses"))
                .Position("2")
                .Action("Index", "Member", new { area = "Orchard.Club" })
            );
        }
    }
}