public static string RunLoad(int load) { Stopwatch sw = new Stopwatch(); sw.Start(); ISessionWrapper sessionWrapper = new SessionWrapper(); var config = sessionWrapper.GetConfig("DefaultConnection"); var session = sessionWrapper.CreateSession(config); var repo = new Model_Repository(session); while (load > 0) { RunSave(repo); load--; } sw.Stop(); return(String.Format("Elapsed={0}", sw.Elapsed)); }