public UserDbService( ILogger <ServiceBase <ChallengeDbContext, UserEntity> > logger, IRepositoryCommand <ChallengeDbContext, UserEntity> repositoryCommand, IUnitOfWork <ChallengeDbContext> unitOfWork) : base(logger, repositoryCommand, unitOfWork) { }
//_emailLogRepositoryCommand public EmailSender(IOptions <AppSettings> settings, IRepositoryQuery <EmailTemplate, long> emailTemplateQuery, IRepositoryQuery <EmailToken, long> emailTokenQuery, IRepositoryCommand <EmailLog, long> emailLogRepositoryCommand) { _appSettings = settings.Value; _emailTemplateQuery = emailTemplateQuery; _emailTokenQuery = emailTokenQuery; _emailLogRepositoryCommand = emailLogRepositoryCommand; }
public UserService(ISSOService ssoService, IRepositoryCommand <User, long> userCommandRepo, IRepositoryQuery <User, long> userQueryRepo, IRepositoryCommand <UserRole, long> userRoleCommandRepo, IRepositoryQuery <UserRole, long> userRoleQueryRepo, IRepositoryQuery <Role, long> roleQueryRepo, IRepositoryQuery <Company, long> companyQueryRepo, IEmailService emailService, IMapper mapper, IOptions <SSoSetting> sSoSetting, IHttpContextExtensionService httpContext) { _ssoSettings = sSoSetting.Value; _ssoService = ssoService; _userCommandRepo = userCommandRepo; _userQueryRepo = userQueryRepo; _userRoleCommandRepo = userRoleCommandRepo; _roleQueryRepo = roleQueryRepo; _companyQueryRepo = companyQueryRepo; _emailService = emailService; _mapper = mapper; _userRoleQueryRepo = userRoleQueryRepo; _httpContext = httpContext; CurrentUserId = _httpContext.GetCurrentSSOUserId(); }
public int ExecuteInsert(IRepositoryCommand commandRepository) { var returnValue = new SqlParameter { Direction = ParameterDirection.ReturnValue }; using (var connection = new SqlConnection(connectionString)) { using (var command = new SqlCommand(commandRepository.CommandName, connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(returnValue); foreach (var parameter in commandRepository.Parameters) { command.Parameters.AddWithValue(parameter.Key, parameter.Value); } connection.Open(); command.ExecuteNonQuery(); } } return((int)returnValue.Value); }
public ActivityLogReportController(IRepositoryCommand <ActivityLog, long> activitylogCommand, IRepositoryQuery <ActivityLog, long> activitylogQuery, IRepositoryQuery <ApplicationUser, long> applicationUserQuery, ILog log) { _activitylogCommand = activitylogCommand; _activitylogQuery = activitylogQuery; _applicationUserQuery = applicationUserQuery; _log = log; }
public PortalPermissionController(IActivityLogRepositoryCommand activityRepo, IRepositoryCommand <Permission, long> permissionCommand, IRepositoryQuery <Permission, long> permissionQuery, ILog log) { _permissionCommand = permissionCommand; _permissionyQuery = permissionQuery; _activityRepo = activityRepo; _log = log; }
public static CommandResult <TData> CommandResult <TData>(this IRepositoryCommand <TData> command, TData data, RedfernDb db, Activity activity) { return(new CommandResult <TData> { Data = data, ActivityContext = new ActivityContext { Description = activity.Description, ActivityId = activity.ActivityId, ActivityDate = activity.ActivityDate, Verb = activity.Verb, Attribute = activity.Attribute, ActorId = activity.ActorId, ActorDisplayName = activity.ActorDisplayName, ObjectId = activity.ObjectId, ObjectType = activity.ObjectType, ObjectDisplayName = activity.ObjectDisplayName, SourceId = activity.SourceId, SourceType = activity.SourceType, SourceDisplayName = activity.SourceDisplayName, TargetId = activity.TargetId, TargetType = activity.TargetType, TargetDisplayName = activity.TargetDisplayName, ContextId = activity.ContextId, ContextType = activity.ContextType, ContextDisplayName = activity.ContextDisplayName, AdditionalData = activity.AdditionalData }, CommandContext = new CommandContext { Initiator = db.Context.ClientUserName, ExecutionTime = DateTime.UtcNow } }); }
public HangfireEmailJob() { _log = log4net.LogManager.GetLogger("HangFireLoggerAppender"); _emailJobQuery = new RepositoryQuery <EmailLog, long>(); _emailJobCommand = new RepositoryCommand <EmailLog, long>(); _emailAttachmentQuery = new RepositoryQuery <EmailAttachment, long>(); }
public PortalRoleController(IActivityLogRepositoryCommand activityRepo, IRepositoryCommand <RolePermission, long> rolePermissionCommand, IRepositoryQuery <RolePermission, long> rolePermissionQuery, Utility utility, ILog log) { _rolePermissionCommand = rolePermissionCommand; _rolePermissionyQuery = rolePermissionQuery; _activityRepo = activityRepo; _utility = utility; _log = log; }
public EventController(IActivityLogRepositoryCommand activityRepo, IRepositoryQuery <Event, long> eventQuery, IRepositoryCommand <Event, long> eventCommand, Utility utility, ILog log) { _activityRepo = activityRepo; _utility = utility; _EventQuery = eventQuery; _EventCommand = eventCommand; _log = log; }
public CreateManyLoggerCommandHandler( IRepositoryCommand <Logger> repository, ILogger <CreateManyLoggerCommandHandler> logger, IServiceList <Logger> serviceList) { _repository = repository; _logger = logger; _serviceList = serviceList; }
public PortalUserController(IActivityLogRepositoryCommand activityRepo, IRepositoryCommand <ApplicationUser, long> applicationUserCommand, Utility utility, IRepositoryQuery <ApplicationUser, long> applicationUser, IRepositoryCommand <ApplicationUserPasswordHistory, long> applicationUserPwdhistory, ILog log) { _applicationUserQuery = applicationUser; _applicationUserCommand = applicationUserCommand; _applicationUserPwdhistoryCommand = applicationUserPwdhistory; _activityRepo = activityRepo; _utility = utility; _log = log; }
public EmailTemplateController(IActivityLogRepositoryCommand activityRepo, IRepositoryQuery <EmailToken, long> EmailTokenQuery, IRepositoryQuery <EmailTemplate, long> EmailTemplateQuery, Utility utility, IRepositoryCommand <EmailTemplate, long> EmailTemplateCommand, ILog log) { _EmailTemplateQuery = EmailTemplateQuery; _EmailTemplateCommand = EmailTemplateCommand; _EmailTokenQuery = EmailTokenQuery; _activityRepo = activityRepo; _utility = utility; _log = log; }
public PortalPermissionController(IActivityLogRepositoryCommand activityRepo, IRepositoryCommand <Permission, long> permissionCommand, IRepositoryQuery <Permission, long> permissionQuery, ILogger <PortalPermissionController> log, IMapper mapper) { _permissionCommand = permissionCommand; _permissionyQuery = permissionQuery; _activityRepo = activityRepo; _log = log; _mapper = mapper; }
public DepartmentService( IRepositoryCommand <Department, long> departmentCommandRepo, IRepositoryQuery <Department, long> departmentQueryRepo, IMapper mapper, IHttpContextExtensionService httpContext) { _departmentCommandRepo = departmentCommandRepo; _departmentQueryRepo = departmentQueryRepo; _mapper = mapper; _httpContext = httpContext; }
public CompanyService( IRepositoryCommand <Company, long> companyCommandRepo, IRepositoryQuery <Company, long> companyQueryRepo, IMapper mapper, IHttpContextExtensionService httpContext) { _companyCommandRepo = companyCommandRepo; _companyQueryRepo = companyQueryRepo; _mapper = mapper; _httpContext = httpContext; }
public FrameworkSetupController(IActivityLogRepositoryCommand activityRepo, IRepositoryQuery <Application, int> application, IRepositoryCommand <Application, int> applicationCommand, IRepositoryQuery <PortalVersion, int> portalversion, IRepositoryQuery <ApplicationUser, long> applicationUser, IRepositoryCommand <ApplicationUserPasswordHistory, long> applicationUserPwdhistory, ILog log) { _applicationQuery = application; _applicationCommand = applicationCommand; _applicationUserQuery = applicationUser; _applicationUserPwdhistoryCommand = applicationUserPwdhistory; _portalversionQuery = portalversion; _activityRepo = activityRepo; _log = log; }
//ApplicationUserManager userManager, ApplicationSignInManager signInManager, public AccountController(IRepositoryQuery <Application, int> applicationQuery, IRepositoryQuery <ApplicationUser, long> applicationUser, IRepositoryCommand <ApplicationUserPasswordHistory, long> passwordCommand, Utility utility, ILog log) { //UserManager = userManager; //_signInManager = signInManager; _applicationUser = applicationUser; _passwordCommand = passwordCommand; _applicationQuery = applicationQuery; _utility = utility; _log = log; }
public TEntity GetSingle <TEntity>(IRepositoryCommand command) where TEntity : new() { var table = GetDataTable(command); if (table.Rows.Count == 0) { return(default(TEntity)); } return(GetSingle <TEntity>(table.Rows[0])); }
public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager, IActivityLogRepositoryCommand activityRepo, IRepositoryCommand <ApplicationUser, long> applicationUserCommand, IRepositoryQuery <Application, int> applicationQuery, IRepositoryQuery <ApplicationUser, long> applicationUser, IRepositoryCommand <ApplicationUserPasswordHistory, long> passwordCommand, Utility utility, ILog log) { _userManager = userManager; _signInManager = signInManager; _applicationUser = applicationUser; _applicationUserCommand = applicationUserCommand; _passwordCommand = passwordCommand; _applicationQuery = applicationQuery; _activityRepo = activityRepo; _utility = utility; _log = log; }
public MetricService( IRepositoryCommand <Metric, long> metricCommandRepo, IRepositoryQuery <Metric, long> metricQueryRepo, IRepositoryQuery <Department, long> departmentQueryRepo, IMapper mapper, IHttpContextExtensionService httpContext) { _metricCommandRepo = metricCommandRepo; _metricQueryRepo = metricQueryRepo; _departmentQueryRepo = departmentQueryRepo; _mapper = mapper; _httpContext = httpContext; }
public VenueService( IRepositoryCommand <Venue, long> venueCommandRepo, IRepositoryQuery <Venue, long> venueQueryRepo, IRepositoryQuery <InterviewSession, long> interviewSessionQueryRepo, IMapper mapper, IHttpContextExtensionService httpContext) { _venueCommandRepo = venueCommandRepo; _venueQueryRepo = venueQueryRepo; _interviewSessionQueryRepo = interviewSessionQueryRepo; _mapper = mapper; _httpContext = httpContext; }
public JobRoleService( IRepositoryCommand <JobRole, long> jobRoleCommandRepo, IRepositoryQuery <JobRole, long> jobRoleQueryRepo, IRepositoryQuery <Department, long> departmentQueryRepo, IMapper mapper, IHttpContextExtensionService httpContext) { _jobRoleCommandRepo = jobRoleCommandRepo; _jobRoleQueryRepo = jobRoleQueryRepo; _departmentQueryRepo = departmentQueryRepo; _mapper = mapper; _httpContext = httpContext; }
public EmailTemplateController(IActivityLogRepositoryCommand activityRepo, IRepositoryQuery <EmailToken, long> EmailTokenQuery, IRepositoryQuery <EmailTemplate, long> EmailTemplateQuery, IRepositoryCommand <EmailTemplate, long> EmailTemplateCommand, ILogger <EmailTemplateController> log, IMapper mapper) { _EmailTemplateQuery = EmailTemplateQuery; _EmailTemplateCommand = EmailTemplateCommand; _EmailTokenQuery = EmailTokenQuery; _activityRepo = activityRepo; _log = log; _mapper = mapper; }
public AuthService( IRepositoryQuery <User, long> userQueryRepo, IRepositoryCommand <User, long> userCommandRepo, ISSOService ssoService, IUserService userService, IEmailService emailService, IHttpContextExtensionService httpContextExtensionService) { _httpContextService = httpContextExtensionService; _ssoService = ssoService; _userService = userService; _emailService = emailService; _userQueryRepo = userQueryRepo; _userCommandRepo = userCommandRepo; }
public Utility(IRepositoryQuery <Permission, long> permissionQuery, IRepositoryQuery <ApplicationRole, long> applicationRoleQuery, IRepositoryQuery <EmailTemplate, long> emailTemplateRepositoryQuery, IRepositoryQuery <EmailToken, long> emailTokenRepositoryQuery, IRepositoryCommand <EmailLog, long> emailLogRepositoryCommand, ApplicationRoleManager applicationRoleManager) { _permissionQuery = permissionQuery; _emailTemplateRepositoryQuery = emailTemplateRepositoryQuery; _emailTokenRepositoryQuery = emailTokenRepositoryQuery; _emailLogRepositoryCommand = emailLogRepositoryCommand; _applicationRoleManager = applicationRoleManager; _applicationRoleQuery = applicationRoleQuery; }
public FrameworkSetupController(ILogger <FrameworkConfigController> log, UserManager <ApplicationUser> userManager, IActivityLogRepositoryCommand activityRepo, IMapper mapper, IRepositoryQuery <Application, int> application, IRepositoryCommand <Application, int> applicationCommand, IRepositoryQuery <PortalVersion, int> portalversion, IRepositoryQuery <ApplicationUser, long> applicationUser, IRepositoryCommand <ApplicationUserPasswordHistory, long> applicationUserPwdhistory, IRepositoryQuery <ApplicationRole, long> applicationRoleQuery) { _userManager = userManager; _applicationQuery = application; _applicationCommand = applicationCommand; _applicationUserQuery = applicationUser; _applicationUserPwdhistoryCommand = applicationUserPwdhistory; _portalversionQuery = portalversion; _activityRepo = activityRepo; _mapper = mapper; _log = log; _applicationRoleQuery = applicationRoleQuery; _setupContract = new FrameworkSetupViewModel(); }
public static CommandResult <TData> CommandResult <TData>(this IRepositoryCommand <TData> command, TData data, RedfernDb db, string activityDescription) { return(new CommandResult <TData> { Data = data, ActivityContext = new ActivityContext { ActivityDate = DateTime.UtcNow, Description = activityDescription, ActorId = db.Context.ClientUserName }, CommandContext = new CommandContext { Initiator = db.Context.ClientUserName, ExecutionTime = DateTime.UtcNow } }); }
public void ExecuteCommand(IRepositoryCommand commandRepository) { using (var connection = new SqlConnection(connectionString)) { using (var command = new SqlCommand(commandRepository.CommandName, connection)) { command.CommandType = CommandType.StoredProcedure; foreach (var parameter in commandRepository.Parameters) { command.Parameters.AddWithValue(parameter.Key, parameter.Value); } connection.Open(); command.ExecuteNonQuery(); } } }
public InterviewSessionService( IRepositoryCommand <InterviewSession, long> interviewSessionCommandRepo, IRepositoryQuery <InterviewSession, long> interviewSessionQueryRepo, IRepositoryQuery <InterviewSessionMetric, long> interviewSessionMetricQueryRepo, IRepositoryCommand <InterviewSessionMetric, long> interviewSessionMetricCommandRepo, IRepositoryQuery <InterviewSessionInterviewer, long> interviewSessionInterviewerQueryRepo, IRepositoryCommand <InterviewSessionInterviewer, long> interviewSessionInterviewerCommandRepo, IRepositoryQuery <InterviewSessionCandidate, long> interviewSessionCandidateQueryRepo, IRepositoryCommand <InterviewSessionCandidate, long> interviewSessionCandidateCommandRepo, IMapper mapper, IHttpContextExtensionService httpContext) { _interviewSessionCommandRepo = interviewSessionCommandRepo; _interviewSessionQueryRepo = interviewSessionQueryRepo; _interviewSessionMetricQueryRepo = interviewSessionMetricQueryRepo; _interviewSessionMetricCommandRepo = interviewSessionMetricCommandRepo; _interviewSessionInterviewerQueryRepo = interviewSessionInterviewerQueryRepo; _interviewSessionInterviewerCommandRepo = interviewSessionInterviewerCommandRepo; _interviewSessionCandidateQueryRepo = interviewSessionCandidateQueryRepo; _interviewSessionCandidateCommandRepo = interviewSessionCandidateCommandRepo; _mapper = mapper; _httpContext = httpContext; }