私は非常に単純なNinjectバインディングを持っています:
Bind<ISessionFactory>().ToMethod(x =>
{
return Fluently.Configure()
.Database(SQLiteConfiguration.Standard
.UsingFile(CreateOrGetDataFile("somefile.db")).AdoNetBatchSize(128))
.Mappings(
m => m.FluentMappings.AddFromAssembly(Assembly.Load("Sauron.Core"))
.Conventions.Add(PrimaryKey.Name.Is(p => "Id"), ForeignKey.EndsWith("Id")))
.BuildSessionFactory();
}).InSingletonScope();
必要なのは、 「somefile.db」を引数に置き換えることです。に似たもの
kernel.Get<ISessionFactory>("somefile.db");
どうすればそれを達成できますか?