Asp.net MVC アプリケーションで MVC Contrib Localization を使用しようとしています。今のところ、リソース ファイルで動作していますが、Sql Server で使用したいと考えています。
このチュートリアルをチェックしています: http://www.codeproject.com/Articles/352583/Localization-in-ASP-NET-MVC-with-Griffin-MvcContri
しかし、Autofac を IoC コンテナーとして使用していますが、これは理解できません。Ninject で使用したことのある人はいますか? または、この Autofac コードを Ninject に変換する方法を知っている人:
// Loads strings from repositories.
builder.RegisterType<RepositoryStringProvider>().AsImplementedInterfaces().InstancePerLifetimeScope();
builder.RegisterType<ViewLocalizer>().AsImplementedInterfaces().InstancePerLifetimeScope();
// Connection factory used by the SQL providers.
builder.RegisterInstance(new AdoNetConnectionFactory("DemoDb")).AsSelf();
builder.RegisterType<LocalizationDbContext>().AsImplementedInterfaces().InstancePerLifetimeScope();
// and the repositories
builder.RegisterType<SqlLocalizedTypesRepository>().AsImplementedInterfaces().InstancePerLifetimeScope();
builder.RegisterType<SqlLocalizedViewsRepository>().AsImplementedInterfaces().InstancePerLifetimeScope();
前もって感謝します。