public PayFortCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IOptions <PayFortOptionConfiguration> payFortOptions) : base(loggerFactory) { _payFortOptions = payFortOptions; _dataContext = dataContext; }
public CourseMaterialCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; }
public PaymentUpdateCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; }
public UserProfileCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; }
public TrainingVideoCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; }
public TrainingBuildCourseDetailCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; }
public UserForgotPasswordCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IPasswordHasher passwordHasher, IMapper mapper, IEmailTemplateService emailTemplateService, IOptions <HostingConfiguration> hostingOptions) : base(loggerFactory) { _dataContext = dataContext; _passwordHasher = passwordHasher; _mapper = mapper; _emailTemplateService = emailTemplateService; _hostingOptions = hostingOptions; }
public TrainingDetailCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper, IMemoryCache cache) : base(loggerFactory) { _dataContext = dataContext; _cache = cache; _mapper = mapper; }
public TrainingExperienceReadCommandHandlers(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IConfigurationProvider configurationProvider, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; _configurationProvider = configurationProvider; }
public UserPaidCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper, IConfigurationProvider configurationProvider) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; _configurationProvider = configurationProvider; }
public UserRegisterCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IPasswordHasher passwordHasher, IMapper mapper, ISMSTemplateService sMSTemplateService) : base(loggerFactory) { _dataContext = dataContext; _passwordHasher = passwordHasher; _mapper = mapper; _sMSTemplateService = sMSTemplateService; }
public CourseReadCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper, IMediator mediator) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; _mediator = mediator; }
public PaymentApprovalCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IConfigurationProvider configurationProvider, IMapper mapper, IMediator mediator) : base(loggerFactory) { _dataContext = dataContext; _configurationProvider = configurationProvider; _mapper = mapper; Mediator = mediator; }
public PaymentCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper, ISMSTemplateService sMSTemplateService, IOptions <SMSConfiguration> smsConfiguration) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; _sMSTemplateService = sMSTemplateService; _smsConfiguration = smsConfiguration; }
public static CreateResult FindFolder <T>(this TrainDTrainorContext context, T Entity) where T : class { var result = new CreateResult(); context.LoadStoredProc(string.Format(@"dbo.{0}_Folder", typeof(T).Name)) .WithSqlParam("@name", GetPropertyValue(Entity, "Name")) .ExecuteStoredProc((handler) => { result = handler.ReadToList <CreateResult>().FirstOrDefault(); }); return(result); }
public static bool CheckTableExists <T>(this TrainDTrainorContext context) where T : class { try { context.Set <T>().Count(); return(true); } catch (Exception) { return(false); } }
public AuthenticateCommandHandler( ILoggerFactory loggerFactory, IOptions <PrincipalConfiguration> principalOptions, IOptions <HostingConfiguration> hostingOptions, TrainDTrainorContext dataContext, IPasswordHasher passwordHasher) : base(loggerFactory) { _principalOptions = principalOptions; _hostingOptions = hostingOptions; _dataContext = dataContext; _passwordHasher = passwordHasher; }
public MapToCourseCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IMapper mapper, ISMSTemplateService sMSTemplateService, IOptions <SMSConfiguration> smsConfiguration, IMediator mediator) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; _sMSTemplateService = sMSTemplateService; _smsConfiguration = smsConfiguration; _mediator = mediator; }
public UserSendOTPCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, ISMSTemplateService sMSTemplateService, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _mapper = mapper; _sMSTemplateService = sMSTemplateService; }
public static void EnsureSeeded(this TrainDTrainorContext context) { if (context.CheckTableExists <Role>()) { if (!context.Roles.Any()) { var roles = JsonConvert.DeserializeObject <List <Role> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "Roles.json")); context.AddRange(roles); context.SaveChanges(); } } if (context.CheckTableExists <User>()) { if (!context.Users.Any()) { var users = JsonConvert.DeserializeObject <List <User> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "Users.json")); context.AddRange(users); context.SaveChanges(); } } if (context.CheckTableExists <UserProfile>()) { if (!context.UserProfiles.Any()) { var usersprofile = JsonConvert.DeserializeObject <List <UserProfile> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "UsersProfile.json")); context.AddRange(usersprofile); context.SaveChanges(); } } if (context.CheckTableExists <UserRole>()) { if (!context.UserRoles.Any()) { var userroles = JsonConvert.DeserializeObject <List <UserRole> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "UserRoles.json")); context.AddRange(userroles); context.SaveChanges(); } } if (context.CheckTableExists <RefreshToken>()) { if (!context.RefreshTokens.Any()) { var userroles = JsonConvert.DeserializeObject <List <RefreshToken> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "RefreshToken.json")); context.AddRange(userroles); context.SaveChanges(); } } if (context.CheckTableExists <UserLogin>()) { if (!context.UserLogins.Any()) { var userroles = JsonConvert.DeserializeObject <List <UserLogin> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "UserLogins.json")); context.AddRange(userroles); context.SaveChanges(); } } if (context.CheckTableExists <Training>()) { if (!context.Training.Any()) { var trainings = JsonConvert.DeserializeObject <List <Training> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "Training.json")); context.AddRange(trainings); context.SaveChanges(); } } if (context.CheckTableExists <Level>()) { if (!context.Levels.Any()) { var trainings = JsonConvert.DeserializeObject <List <Level> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "Levels.json")); context.AddRange(trainings); context.SaveChanges(); } } if (context.CheckTableExists <Country>()) { if (!context.Countries.Any()) { var countries = JsonConvert.DeserializeObject <List <Country> >(File.ReadAllText("DataSeeds" + Path.DirectorySeparatorChar + "Countries.json")); context.AddRange(countries); context.SaveChanges(); } } }
public EmailTemplateService(TrainDTrainorContext dataContext, IMemoryCache cache) { _dataContext = dataContext; _cache = cache; }
public UserController(IMediator mediator, TrainDTrainorContext context, IAppCache cache) : base(mediator, cache) { _context = context; }
public UserChangePasswordCommandHandler(ILoggerFactory loggerFactory, TrainDTrainorContext dataContext, IPasswordHasher passwordHasher, IMapper mapper) : base(loggerFactory) { _dataContext = dataContext; _passwordHasher = passwordHasher; _mapper = mapper; }