コード例 #1
0
 public DefaultController(IUsersRepository userRepository, IProfilesRepository profilesRepository, IRolesRepository rolesRepository, ISitemapGenerator sitemapGenerator)
 {
     _userRepository     = userRepository;
     _profilesRepository = profilesRepository;
     _rolesRepository    = rolesRepository;
     _sitemapGenerator   = sitemapGenerator;
 }
コード例 #2
0
 public GeneralController(IAnnouncementsRepository announcementsRepository, IUsersRepository usersRepository, IProfilesRepository profilesRepository, ISitemapGenerator sitemapGenerator)
 {
     _usersRepository         = usersRepository;
     _announcementsRepository = announcementsRepository;
     _profilesRepository      = profilesRepository;
     _sitemapGenerator        = sitemapGenerator;
 }
コード例 #3
0
        public override void Dispose()
        {
            if (_profileRepository == null) return;
            _profileRepository.Dispose();
            _profileRepository = null;

        }
コード例 #4
0
 public UsersService(
     UserManager <IdentityUser> userManager,
     RoleManager <IdentityRole> roleManager,
     IProfilesRepository profilesRepository)
 {
     _userManager        = userManager;
     _roleManager        = roleManager;
     _profilesRepository = profilesRepository;
 }
コード例 #5
0
        public PhotosController(IProfilesRepository repo, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig)
        {
            this._repo             = repo;
            this._mapper           = mapper;
            this._cloudinaryConfig = cloudinaryConfig;

            Account acc = new Account(
                _cloudinaryConfig.Value.CloudName,
                _cloudinaryConfig.Value.ApiKey,
                _cloudinaryConfig.Value.ApiSecret
                );

            this._cloudinary = new Cloudinary(acc);
        }
コード例 #6
0
 public AuthController(UserManager<AppUser> userManager, IJwtFactory jwtFactory, IOptions<JwtIssuerOptions> jwtOptions,
 IProfilesRepository profileRepo, ICompaniesRepository companiesRepository, IConsultantsRepository consultantsRepository,
 IJobsRepository jobsRepository, ILocalEventsRepository localEventsRepository)
 {
     _userManager = userManager;
     _jwtFactory = jwtFactory;
     _jwtOptions = jwtOptions.Value;
     _profileRepo = profileRepo;
     _companiesRepository = companiesRepository;
     _consultantsRepository = consultantsRepository;
     _jobsRepository = jobsRepository;
     _localEventsRepository = localEventsRepository;
     _jobsRepository = jobsRepository;
 }
コード例 #7
0
 public AccountController(IAuthProvider authProvider,
                          IPasswordValidator passwordValidator,
                          IPasswordEncrypter passwordEncryptor,
                          IUsersRepository userRepository,
                          IMobileNumbersRepository mobileNumberRepository,
                          IProfilesRepository profilesRepository,
                          IOrdersRepository ordersRepository,
                          IRolesRepository rolesRepository
                          )
 {
     _authProvider            = authProvider;
     _passwordValidator       = passwordValidator;
     _passwordEncryptor       = passwordEncryptor;
     _userRepository          = userRepository;
     _mobileNumbersRepository = mobileNumberRepository;
     _profilesRepository      = profilesRepository;
     _ordersRepository        = ordersRepository;
     _rolesRepository         = rolesRepository;
 }
コード例 #8
0
        public static void Seed(IProfilesRepository profilesRepository)
        {
            var existingProfiles = profilesRepository.GetAllProfiles();

            foreach (var profile in profiles)
            {
                profile.PublicationActivity = new List <PublicationActivity>();
                profile.PublicationActivity.Add(new PublicationActivity {
                    LastFillDate = ProfileProvider.NextLastFillDate
                });

                profile.ProfessionalActivity = new List <ProfessionalActivity>();
                profile.ProfessionalActivity.Add(new ProfessionalActivity {
                    LastFillDate = ProfileProvider.NextLastFillDate
                });

                profile.AdditionalActivity = new List <AdditionalActivity>();
                profile.AdditionalActivity.Add(new AdditionalActivity {
                    LastFillDate = ProfileProvider.NextLastFillDate
                });

                var exists = false;
                foreach (var existingProfile in existingProfiles)
                {
                    if (existingProfile.LastName.Equals(profile.LastName) &&
                        existingProfile.FirstName.Equals(profile.FirstName) &&
                        existingProfile.MiddleName.Equals(profile.MiddleName))
                    {
                        exists = true;
                        break;
                    }
                }

                if (exists)
                {
                    continue;
                }

                profilesRepository.CreateProfile(profile);
            }
        }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WaterProfilesService"/> class.
 /// </summary>
 /// <param name="profilesRepository">Provides data persistence.</param>
 public WaterProfilesService(IProfilesRepository profilesRepository)
 {
     this.profilesRepository = profilesRepository;
 }
コード例 #10
0
 public ProfileService(IProfilesRepository profilesRepository, IProfileMapper profileMapper)
 {
     _profileMapper      = profileMapper;
     _profilesRepository = profilesRepository;
 }
コード例 #11
0
 public ProfessionalActivityController(IProfilesRepository profilesRepository)
 {
     _profilesRepository = profilesRepository;
 }
コード例 #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EquipmentProfilesService"/> class.
 /// </summary>
 /// <param name="profilesRepository">Provides data persistence.</param>
 public EquipmentProfilesService(IProfilesRepository profilesRepository)
 {
     this.profilesRepository = profilesRepository;
 }
コード例 #13
0
 public ConsultantsRepository(ConsultantsDbContext context, IProfilesRepository profilesRepository)
 {
     _context            = context;
     _profilesRepository = profilesRepository;
 }
コード例 #14
0
 public ContactsController(IProfilesRepository profilesRepository)
 {
     _profileRepository = profilesRepository ?? throw new ArgumentNullException(nameof(profilesRepository));
 }
コード例 #15
0
 public ProfilesBusinessWorkflow(IProfilesRepository profilesRepository, IProfileMapper profileMapper)
 {
     ProfilesRepository = profilesRepository;
     ProfileMapper = profileMapper;
 }
コード例 #16
0
 public ProfileService(IProfilesRepository profileRepository, IUsersRepository usersRepository)
 {
     _profileRepository = profileRepository;
     _usersRepository = usersRepository;
 }
コード例 #17
0
 public ChatController()
 {
     _profilesRepository = new ProfilesRepository(Constants.Constants.ConnectionString);
     _chatsRepository    = new ChatsRepository(Constants.Constants.ConnectionString, _profilesRepository);
 }
コード例 #18
0
 public ProfileWithDapperController(IProfilesRepository _profilesRepository)
 {
     profilesRepository = _profilesRepository;
 }
コード例 #19
0
 public MessageController()
 {
     _profilesRepository = new ProfilesRepository(Constants.Constants.ConnectionString);
     _messagesRepository = new MessagesRepository(Constants.Constants.ConnectionString);
 }
コード例 #20
0
 public ProfilesBusinessWorkflow(IProfilesRepository profilesRepository, IProfileMapper profileMapper)
 {
     ProfilesRepository = profilesRepository;
     ProfileMapper      = profileMapper;
 }