public PeopleController()
 {
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
 }
 public ContactInformationController(IContactInformationRepository contactInformationRepository,
     IPeopleRepository peopleRepository)
 {
     _contactInformationRepository = contactInformationRepository;
     _peopleRepository = peopleRepository;
     _viewMessageLogic = new ViewMessageLogic(this);
 }
Exemplo n.º 3
0
 public PraiseController(IPraiseRepository praiseRepository, IPeopleRepository peopleRepository, INotifier notifier, IModerationsRepository moderationsRepository)
 {
     _praiseRepository = praiseRepository;
     _peopleRepository = peopleRepository;
     _notifier = notifier;
     _moderationsRepository = moderationsRepository;
 }
 public PlaceController(WorkersInMotionDB context)
 {
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
 }
 public PeopleBusinessImpl(IPeopleRepository repository)
 {
     if(repository == null)
     {
         throw new ArgumentNullException("repository");
     }
     _repository = repository;
 }
 public SessionManagementRepository(IUserRepository userRepository, IPeopleRepository peopleRepository)
 {
     _userRepository = userRepository;
     _peopleRepository = peopleRepository;
     _userNameIdentifier = "loggedUserName";
     _userEmailIdentifier = "loggedUserEmail";
     _userRoleIdentifier = "loggedUserRole";
     _userIdIdentifier = "loggedUserId";
 }
 public ServicePointController(WorkersInMotionDB context)
 {
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IRegionRepository = new RegionRepository(context);
 }
 //IPeopleService _peopleService;
 public AddressBookViewModel(IPeopleRepository repository, Infrastructure.IView view)
 {
     //_peopleService = peopleService;
     //this.People = _peopleService.GetAll().ToList();
     var people = repository.GetAll().ToList();
     _people = people;
     View = view;
     View.ViewModel = this;
 }
Exemplo n.º 9
0
 public InhabitantController(IPeopleRepository peopleRepo, 
     IAddressRepository addressRepo,
     ICountyRepository countyRepo,
     IProvinceRepository provinceRepo)
 {
     _peopleRepository = peopleRepo;
     _addressRepository = addressRepo;
     _countyRepository = countyRepo;
     _provinceRepository = provinceRepo;
 }
 public StoreVistController()
 {
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IJobRepository = new JobRepository(new WorkersInMotionDB());
 }
Exemplo n.º 11
0
 public MarketController()
 {
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IUserRepository = new UserRepository(new WorkersInMotionDB());
     this._IGlobalUserRepository = new GlobalUserRepository(new WorkersInMotionDB());
 }
 public StoreVisitController(WorkersInMotionDB context)
 {
     this._IOrganizationRepository = new OrganizationRepository(context);
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IJobRepository = new JobRepository(context);
     this._IUserRepository = new UserRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
     this._IPORepository = new PORepository(context);
 }
 public CustomerViewController(WorkersInMotionDB context)
 {
     this._IOrganizationRepository = new OrganizationRepository(context);
     this._IUserRepository = new UserRepository(context);
     this._IOrganizationSubscriptionRepository = new OrganizationSubscriptionRepository(context);
     this._IUserSubscriptionRepository = new UserSubscriptionRepository(context);
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
 }
Exemplo n.º 14
0
 public NotificationController(ISessionManagementRepository sessionManagement, IUserRepository userRepository, INotificationRepository notificationRepository, INotificationTypeRepository notificationTypeRepository, IPeopleRepository peopleRepository, ITeacherRepository teacherRepository,
     IAcademicYearDetailsRepository academicYearDetailRepository, IStudentRepository studentRepository, IParentRepository parentRepository, IGradeRepository gradeRepository, IAcademicYearRepository academicYearRepository, IEnrollRepository enrollRepository, IEducationLevelRepository areaReporsitory)
 {
     _sessionManagement = sessionManagement;
     _userRepository = userRepository;
     _notificationRepository = notificationRepository;
     _notificationTypeRepository = notificationTypeRepository;
     _peopleRepository = peopleRepository;
     _teacherRepository = teacherRepository;
     _academicYearDetailRepository = academicYearDetailRepository;
     _parentRepository = parentRepository;
     _studentRepository = studentRepository;
     _gradeRepository = gradeRepository;
     _academicYear = academicYearRepository;
     _enrollRepository = enrollRepository;
     _areaReporsitory = areaReporsitory;
     _viewMessageLogic = new ViewMessageLogic(this);
 }
Exemplo n.º 15
0
 public EmployeeService(IPeopleRepository peopleRepository)
 {
     _peopleRepository = peopleRepository;
 }
Exemplo n.º 16
0
 public HomeController(IPeopleRepository peopleRepository, IConfiguration configuration)
 {
     _peopleRepository = peopleRepository;
     _configuration    = configuration;
 }
Exemplo n.º 17
0
 public PeopleController(IPeopleRepository peopleRepository)
 {
     _peopleRepository = peopleRepository ?? throw new ArgumentNullException(nameof(peopleRepository));
 }
Exemplo n.º 18
0
 public PeopleController(IPeopleRepository db)
 {
     this._db = db;
 }
 public void Initialize()
 {
     IUnityContainer container = new UnityContainer();
     container.LoadConfiguration();
     repository = container.Resolve<IPeopleRepository>();
 }
Exemplo n.º 20
0
 public BaseApiController(IPeopleRepository peopleRepository)
 {
     _PeopleRepository = peopleRepository;
 }
 public PeopleBusinessWorkflow(IPeopleRepository peopleRepository, IPersonMapper personMapper)
 {
     PeopleRepository = peopleRepository;
     PersonMapper = personMapper;
 }
Exemplo n.º 22
0
 /// <summary>
 /// Initializes a new instance of the PhoneNumbersController class.
 /// </summary>
 public PhoneNumbersController(IPeopleRepository peopleRepository, IUnitOfWorkFactory unitOfWorkFactory)
 {
     _peopleRepository  = peopleRepository;
     _unitOfWorkFactory = unitOfWorkFactory;
 }
 public void PeopleRepository_ShouldBeNullAndNotFoundForInvalidDataSourceUrl()
 {
     peopleRepository = new PeopleRepository("http://agl-developer-test.azurewebsites.net/");
     Assert.IsFalse(peopleRepository.IsInitialized);
     Assert.IsNull(peopleRepository.People);
 }
 public void Initialize()
 {
     peopleRepository = new PeopleRepository();
 }
Exemplo n.º 25
0
 public BaseApiController(IPeopleRepository peopleRepository)
 {
     _PeopleRepository = peopleRepository;
 }
Exemplo n.º 26
0
 public PeopleService(IGenericRepository genericRepo, IPeopleRepository peopleRepo)
 {
     _peopleRepo  = peopleRepo;
     _genericRepo = genericRepo;
 }
Exemplo n.º 27
0
 public PeopleService(IPeopleRepository peopleRepository, IUnitOfWork unitOfWork)
 {
     _peopleRepository = peopleRepository;
     _unitOfWork       = unitOfWork;
 }
Exemplo n.º 28
0
 public People(IPeopleRepository peopleRepository, IImage imageDomain, IRole roleDomain)
 {
     _peopleRepository = peopleRepository;
     _imageDomain      = imageDomain;
     _roleDomain       = roleDomain;
 }
Exemplo n.º 29
0
 public PeopleService(IPeopleRepository peopleRepository,IUnitOfWork unitOfWork)
 {
     _peopleRepository = peopleRepository;
     _unitOfWork = unitOfWork;
 }
Exemplo n.º 30
0
 public PeopleService(IPeopleRepository repository)
 {
     _repository = repository;
 }
Exemplo n.º 31
0
 public HomeController(IPeopleRepository peopleRepository)
 {
     _peopleRepository = peopleRepository;
 }
Exemplo n.º 32
0
 public PeopleService(IPeopleRepository peopleRepository, IEMSLogger <PeopleService> logger, IDateTimeUtil dateTimeUtil)
 {
     _peopleRepository = peopleRepository;
     _logger           = logger;
     _dateTimeUtil     = dateTimeUtil;
 }
Exemplo n.º 33
0
 public ProfilesController(IPeopleRepository peopleRepository)
 {
     this.peopleRepository = peopleRepository;
 }
Exemplo n.º 34
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceProvider services, IPeopleRepository peopleRepository)
        {
            //Create Roles and SuperAdmin
            CreateRolesAndUser(services, peopleRepository).Wait();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseRouting();

            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            //Swagger
            app.UseSwagger();
            app.UseSwaggerUI(config =>
            {
                config.SwaggerEndpoint("/swagger/v1/swagger.json", "AgroBarn Api v1");
                config.RoutePrefix = string.Empty;     //Start Swagger UI in index page
            });
        }
Exemplo n.º 35
0
 public People(IPeopleRepository peopleRepository)
 {
     _peopleRepository = peopleRepository;
 }
Exemplo n.º 36
0
        private async Task CreateRolesAndUser(IServiceProvider serviceProvider, IPeopleRepository peopleRepository)
        {
            //Adding cumtoms roles
            var roleManager = serviceProvider.GetRequiredService <RoleManager <ApplicationRole> >();
            var userManager = serviceProvider.GetRequiredService <UserManager <ApplicationUser> >();

            //Type roles
            List <ApplicationRole> roles = new List <ApplicationRole>();

            roles.Add(new ApplicationRole
            {
                Name        = "Admin",
                Description = "Rol de un Administrador",
                Status      = 1,
            });

            roles.Add(new ApplicationRole
            {
                Name        = "User",
                Description = "Rol de un usuario",
                Status      = 1,
            });

            IdentityResult roleResult;

            foreach (var rol in roles)
            {
                //Creating the roles and saved in database
                var roleExist = await roleManager.RoleExistsAsync(rol.Name);

                if (!roleExist)
                {
                    roleResult = await roleManager.CreateAsync(rol);
                }
            }

            string email         = Configuration.GetSection("SuperUserCredential")["Email"];
            string password      = Configuration.GetSection("SuperUserCredential")["Password"];
            string name          = Configuration.GetSection("SuperUserCredential")["Name"];
            string firstSurname  = Configuration.GetSection("SuperUserCredential")["FirstSurname"];
            string secondSurname = Configuration.GetSection("SuperUserCredential")["SecondSurname"];

            var existingUser = await userManager.FindByEmailAsync(email);

            if (existingUser == null)
            {
                var superUser = new ApplicationUser
                {
                    Email    = email,
                    UserName = email,
                    Status   = 1
                };

                var createdUser = await userManager.CreateAsync(superUser, password);

                if (createdUser.Succeeded)
                {
                    await userManager.AddToRoleAsync(superUser, "Admin");

                    //Save data in people table
                    PeopleDto newPeople = new PeopleDto
                    {
                        UserId        = superUser.Id,
                        Name          = name,
                        FirstSurname  = firstSurname,
                        SecondSurname = secondSurname,
                        Status        = 1,
                        UserCreate    = superUser.Id,
                        DateCreate    = DateTime.Now
                    };

                    await peopleRepository.AddAsync(newPeople);
                }
            }
        }
Exemplo n.º 37
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="repository"><see cref="IPeopleRepository"/>.</param>
 /// <param name="userInfo"><see cref="IActiveUserInfoService"/>.</param>
 public PeopleService(IPeopleRepository repository, IActiveUserInfoService userInfo)
 {
     _repository = Check.NotNull(repository, nameof(repository));
     _userInfo   = Check.NotNull(userInfo, nameof(userInfo));
 }
 public PeopleController(IPeopleRepository repository)
 {
     this.repository = repository;
 }
Exemplo n.º 39
0
 public PeopleService(IPeopleRepository repository)
 {
     _repo = repository;
 }
 public UnitTest1()
 {
     _peopleRepository = new PeopleRepositoryFake();
     _controller       = new PeopleController(_peopleRepository);
 }
Exemplo n.º 41
0
 public VehicleViewModel(IDataService dataService, IFilmRepository filmRepository, IPeopleRepository peopleRepository)
 {
     _dataService      = dataService;
     _filmRepository   = filmRepository;
     _peopleRepository = peopleRepository;
     InitAsyncCommand  = new AsyncRelayCommand <Vehicle>(InitAsync);
 }
 public PersonCarController(IPeopleRepository peopleRepository, ICarRepository carRepository)
 {
     _peopleRepository = peopleRepository;
     _carRepository    = carRepository;
 }
 /// <summary>
 /// Const.
 /// </summary>
 /// <param name="peopleRepository">Repository for obtaining people.</param>
 /// <param name="activeUser">Servis for obtaining active user.</param>
 public PeopleController(IPeopleRepository peopleRepository, IActiveUser activeUser)
 {
     _peopleRepository = Check.NotNull(peopleRepository, nameof(peopleRepository));
     _activeUser       = Check.NotNull(activeUser, nameof(activeUser));
 }
Exemplo n.º 44
0
 public NamesApi(IPeopleRepository people)
 {
     this.people = people;
 }
Exemplo n.º 45
0
 public PeopleApi(IPeopleRepository repo)
 {
     _repo = repo;
 }
Exemplo n.º 46
0
		public PeopleManager(IPeopleRepository repository)
		{
			_repository = repository;
		}
Exemplo n.º 47
0
 public LoginController(IPeopleRepository peopleRepo)
 {
     _peopleRepository = peopleRepo;
 }
Exemplo n.º 48
0
 public PeopleController()
 {
     db = SQLiteRegistration.GetRepository(this);
 }
Exemplo n.º 49
0
 public PeopleV2Controller(IPeopleRepository repository)
     : base(repository)
 {
 }
 public GetPeopleSkillsHandler(IPeopleRepository peopleRepository, ILogger <GetPeopleSkillsHandler> logger)
 {
     _peopleRepository = peopleRepository;
     _logger           = logger;
 }
 public UpdatePersonHandler(IPeopleRepository peopleRepository, ILogger <UpdatePersonHandler> logger)
 {
     _peopleRepository = peopleRepository;
     _logger           = logger;
 }
Exemplo n.º 52
0
 public PeopleService()
 {
     _peopleRepository = new PeopleRepository(new ContosoDbContext());
 }
Exemplo n.º 53
0
 public PeopleFactory(HttpRequestMessage request, IPeopleRepository peopleRepository)
 {
     _UrlHelper = new UrlHelper(request);
     _PeopleRepository = peopleRepository;
 }
Exemplo n.º 54
0
 public PeopleController(IPeopleRepository peopleRepository)
 {
     _peopleRepository = peopleRepository;
 }
Exemplo n.º 55
0
 public DiscordMessageListener(IBillRepository billRepository, IShoppingRepository shoppingRepository, IPeopleRepository peopleRepository, IDiscordService discordService)
 {
     _discordService  = discordService;
     _discordCommands = new Dictionary <string, IDiscordCommand>
     {
         { "bills", new ListBillCommand(discordService, billRepository, peopleRepository) },
         { "shopping", new ListShoppingCommand(discordService, shoppingRepository, peopleRepository) }
     };
 }
Exemplo n.º 56
0
 public People(IPeopleRepository peopleSqlRepository, IPeopleMongoRepository peopleMongoRepository, IPeopleElasticRepository peopleElasticRepository)
 {
     _peopleSqlRepository     = peopleSqlRepository;
     _peopleMongoRepository   = peopleMongoRepository;
     _peopleElasticRepository = peopleElasticRepository;
 }
Exemplo n.º 57
0
 public Foo(IPeopleRepository people)
 {
     _people = people;
 }
Exemplo n.º 58
0
 public PeopleService(IPeopleRepository repository,IObjectMapper mapper)
 {
     this._repository = repository;
     this._mapper = mapper;
 }