/// <summary> /// The main view of the home page. /// </summary> public ActionResult Index() { using (var logTimer = new FAutoScopedLogTimer(this.GetType().ToString(), bCreateNewLog: true)) { var result = new CrashesViewModel(); using (var entitile = new CrashReportEntities()) { var unitOfWork = new UnitOfWork(entitile); result.BranchNames = unitOfWork.CrashRepository.GetBranchesAsListItems(); result.BranchNames.ForEach(data => data.Selected = false); result.VersionNames = unitOfWork.CrashRepository.GetVersionsAsListItems(); result.VersionNames.ForEach(data => data.Selected = false); result.PlatformNames = unitOfWork.CrashRepository.GetPlatformsAsListItems(); result.PlatformNames.ForEach(data => data.Selected = false); result.EngineModes = unitOfWork.CrashRepository.GetEngineModesAsListItems(); result.EngineModes.ForEach(data => data.Selected = false); result.EngineVersions = unitOfWork.CrashRepository.GetEngineVersionsAsListItems(); result.EngineVersions.ForEach(data => data.Selected = false); result.IsVanilla = null; result.GenerationTime = logTimer.GetElapsedSeconds().ToString("F2"); } return(View("Index", result)); } }
/// <summary> /// /// </summary> /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { _entityContext.Database.Connection.Close(); _CrashRepository = null; _buggRepository = null; _functionRepository = null; _userRepository = null; _callstackRepository = null; _userGroupRepository = null; _errorMessageRepository = null; _entityContext.Dispose(); _entityContext = null; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">A reference to the *single* instance of the data context.</param> public UserRepository(CrashReportEntities entityContext) { _entityContext = entityContext; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">A reference to the *single* instance of the data context.</param> public ErrorMessageRepository(CrashReportEntities entityContext) { _entityContext = entityContext; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">A reference to the *single* instance of the data context.</param> public DataRepository(CrashReportEntities entityContext) { _entityContext = entityContext; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">A reference to the *single* instance of the data context.</param> public CallStackRepository(CrashReportEntities entityContext) { _entityContext = entityContext; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">An entity context object</param> public UnitOfWork(CrashReportEntities entityContext) { this._entityContext = entityContext; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">A reference to the *single* instance of the data context.</param> public FunctionRepository(CrashReportEntities entityContext) { _entityContext = entityContext; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">A reference to the *single* instance of the data context.</param> public CrashRepository(CrashReportEntities entityContext) { _entityContext = entityContext; _entityContext.Database.CommandTimeout = 1200; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">A reference to the *single* instance of the data context.</param> public UserGroupRepository(CrashReportEntities entityContext) { _entityContext = entityContext; }
/// <summary> /// Constructor /// </summary> /// <param name="entityContext">An entity context object</param> public UnitOfWork(CrashReportEntities entityContext) { this._entityContext = entityContext; _entityContext.Database.CommandTimeout = 600; }