public MasterController() { var factory = MvcApplication.SessionFactory; NhSession = factory.OpenSession(); resolver = new AttackResolver(MvcApplication.CombatantFactory); sender = new AttackSender(NhSession, resolver); sender.CheckPeriodicAttacks(); ////using (var transaction = NhSession.BeginTransaction()) ////{ //// Identity identity = new Identity() { Id = Guid.NewGuid(), Name = "René" }; //// NhSession.Save(identity); //// transaction.Commit(); ////} //factory.Close(); }
public AttackSender(ISession nhSession, AttackResolver attackResolver) { NhSession = nhSession; this.attackResolver = attackResolver; }