here is screenshot of IDE I have installed autofac and autofac.mvc5 both packages but RegisterControllers() method is not available and also "Using AutoFac.Integeration.Mvc" Namespace not accessible and showing error.
here is my code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using OdoFood.Data.Services;
using System.Reflection;
using Autofac;
using Autofac.Integration.Mvc;
namespace OdoFood.Web
{
public class ContainerConfig
{
internal static void RegisterContainer()
{
var builder = new ContainerBuilder();
builder.RegisterController(typeof(MvcApplication).Assembly);
}
}
}
Your code...
...says
RegisterController(singular) notRegisterControllers(plural). Add anson the end of that.