public ApplicationInfoQueryHandlerShould() : base() { var dapperQueryHelper = new DapperQueryHelper(() => Dbconnection); _applicationInfoRepository = new ApplicationInfoRepository(ExampleContext); _applicationInfoQueryHandler = new ApplicationInfoQueryHandler(dapperQueryHelper); }
public override void OnActionExecuted(ActionExecutedContext filterContext) { try { var isValid = filterContext.Exception == null && filterContext.Controller.ViewData.ModelState.IsValid && !QPController.IsError(filterContext.HttpContext); if (isValid && DbRepository.Get().RecordActions) { var currentDbVersion = new ApplicationInfoRepository().GetCurrentDbVersion(); var actionToSerialize = XmlDbUpdateHttpContextHelpers.CreateXmlDbUpdateActionFromHttpContext(filterContext.HttpContext, _code ?? BackendActionContext.Current.ActionCode, _ignoreForm); XmlDbUpdateSerializerHelpers .SerializeAction(actionToSerialize, currentDbVersion, CommonHelpers.GetBackendUrl(filterContext.HttpContext)) .Save(QPContext.GetRecordXmlFilePath(), SaveOptions.None); } } catch (Exception ex) { throw new Exception("There was an error while recording xml actions", ex); } base.OnActionExecuted(filterContext); }
public ApplicationInfoRepositoryShould() : base() { _applicationInfoRepository = new ApplicationInfoRepository(ExampleContext); }