Errors updated. Do not use old build.
This commit is contained in:
24
Tanshu.Accounts.Repository/Ninject/QueryStore.cs
Normal file
24
Tanshu.Accounts.Repository/Ninject/QueryStore.cs
Normal file
@ -0,0 +1,24 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using FluentNHibernate.Conventions;
|
||||
//using FluentNHibernate.Conventions.Instances;
|
||||
//using NHibernate;
|
||||
//using NHibernate.SqlCommand;
|
||||
//using System.Diagnostics;
|
||||
//using Ninject.Modules;
|
||||
|
||||
//namespace Tanshu.Accounts.Repository
|
||||
//{
|
||||
// public class RepositoryModule : NinjectModule
|
||||
// {
|
||||
// public override void Load()
|
||||
// {
|
||||
// Bind<ISessionFactory>().ToMethod(m => SessionRepository.GetSessionFactory()).InSingletonScope();
|
||||
// Bind<ISession>().ToMethod (m=>m.Kernel.
|
||||
// Bind<ISession>().To<Sword>();
|
||||
// Bind<Samurai>().ToSelf();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
48
Tanshu.Accounts.Repository/Ninject/SessionRepository.cs
Normal file
48
Tanshu.Accounts.Repository/Ninject/SessionRepository.cs
Normal file
@ -0,0 +1,48 @@
|
||||
//using FluentNHibernate.Automapping;
|
||||
//using FluentNHibernate.Cfg;
|
||||
//using FluentNHibernate.Cfg.Db;
|
||||
//using NHibernate;
|
||||
//using NHibernate.Cfg;
|
||||
//using Tanshu.Accounts.Conventions;
|
||||
//using Tanshu.Accounts.Entities;
|
||||
//using Tanshu.Accounts.SqlDAO;
|
||||
|
||||
//namespace Tanshu.Accounts.Repository
|
||||
//{
|
||||
// public class SessionRepository
|
||||
// {
|
||||
// public static Configuration GetConfiguration()
|
||||
// {
|
||||
// var storeConfiguration = new StoreConfiguration();
|
||||
// var persistenceModel = AutoMap.AssemblyOf<Voucher>(storeConfiguration)
|
||||
// .Conventions.Setup(c =>
|
||||
// {
|
||||
// c.Add<PrimaryKeyConvention>();
|
||||
// c.Add<CustomForeignKeyConvention>();
|
||||
// c.Add<ClassConvention>();
|
||||
// c.Add<CascadeConvention>();
|
||||
// c.Add<NotNullConvention>();
|
||||
// //c.Add(DefaultLazy.Never());
|
||||
// //c.Add<EnumConvention>();
|
||||
// });
|
||||
|
||||
// return Fluently.Configure()
|
||||
// .Database(MsSqlConfiguration.MsSql2005.ConnectionString(p => p.FromConnectionStringWithKey("FluentCon")))
|
||||
// .Mappings(m => m.AutoMappings.Add(persistenceModel))
|
||||
// .BuildConfiguration()
|
||||
// .SetInterceptor(new NHSQLInterceptor());
|
||||
// }
|
||||
// public static ISessionFactory GetSessionFactory()
|
||||
// {
|
||||
// return GetConfiguration().BuildSessionFactory();
|
||||
// }
|
||||
// public static ISession GetSession(ISessionFactory factory)
|
||||
// {
|
||||
// return factory.OpenSession();
|
||||
// }
|
||||
// public static IStatelessSession GetStatelessSession(ISessionFactory factory)
|
||||
// {
|
||||
// return factory.OpenStatelessSession();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user