Using Automapper to map a service result to a view model
===

I am trying to map a service result to a specific view model. I have an Entity called Category which contains an Id and a Name. I expose this via a repository, ICategoryRepository. I have a service IInfrastructureService that uses the category repository to GetAllCategories. GetAllCategories returns an IList<Category>. In my MVC project. I have a controller called NavigationController. This controller needs to make a call to the service to GetAllCategories. I would like to map this result into a structure like this:

    public class CategoryViewModel {
        public Guid CategoryId { get; set; }
        public string Name { get; set; }
    }

    public class CategoryMenuViewModel {
        public IList<CategoryViewModel> Categories { get; set; }
        public CategoryViewModel SelectedCategory { get; set; }
    }

I would like to use Automapper to do this. In my Application_Start() I create the maps:

    Mapper.CreateMap<Category, CategoryViewModel>();

Then in my controller: 

    public ViewResult CategoryMenu()
    {
        CategoryMenuViewModel viewModel = new CategoryMenuViewModel();
        Mapper.CreateMap<Category, CategoryViewModel>();
        viewModel.Categories = Mapper.Map<IList<Category>, IList<CategoryViewModel>>(_infrastructureService.GetAllCategories());
        return View(viewModel);
    }

This is giving me this exception: Duplicate type name within an assembly.

I'm not sure what I'm doing wrong here. Any help or guidance would rock!