private static void RegisterWithCommonServiceLocator(IKernel kernel)
{
kernel.Bind<NinjectServiceLocator>().ToMethod(c => new NinjectServiceLocator(kernel)).InSingletonScope();
Microsoft.Practices.ServiceLocation.ServiceLocator.SetLocatorProvider(() => kernel.Get<NinjectServiceLocator>());
}