Пример #1
0
        /// <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));
            }
        }
Пример #2
0
 /// <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;
 }
Пример #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public ErrorMessageRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
Пример #5
0
 /// <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;
 }
Пример #7
0
 /// <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 ErrorMessageRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
Пример #10
0
 /// <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 CallStackRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
Пример #12
0
 /// <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;
 }
Пример #14
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public UserGroupRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
Пример #15
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">An entity context object</param>
 public UnitOfWork(CrashReportEntities entityContext)
 {
     this._entityContext = entityContext;
     _entityContext.Database.CommandTimeout = 600;
 }
Пример #16
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">An entity context object</param>
 public UnitOfWork(CrashReportEntities entityContext)
 {
     this._entityContext = entityContext;
 }