public StudentController(IStudentAppService studentAppService, IEnvironmentAppService environmentAppService,
                          IApplicationUserAppService applicationUserAppService)
 {
     _studentAppService         = studentAppService;
     _environmentAppService     = environmentAppService;
     _applicationUserAppService = applicationUserAppService;
 }
        public async Task <IActionResult> AddAsync([FromServices] IEnvironmentAppService environmentAppService,
                                                   [FromServices] IProjectAppService projectAppService, string projectId, [FromBody] Environment environment)
        {
            environment.Project = await projectAppService.GetAsync(projectId);

            await environmentAppService.CreateAsync(environment);

            return(Created($"{Request.Path}", environment));
        }
        public async Task <IActionResult> CreateAsync([FromServices] IFlagAppService flagAppService,
                                                      [FromServices] IEnvironmentAppService environmentAppService, string projectId, string environmentId, [FromBody] Flag flag)
        {
            flag.Environment = await environmentAppService.GetAsync(projectId, environmentId);

            await flagAppService.CreateAsync(flag);

            return(Ok());
        }
 public RegisterModel(
     UserManager <Domain.Entities.ApplicationUser> userManager,
     SignInManager <Domain.Entities.ApplicationUser> signInManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender,
     IEnvironmentAppService environmentAppService)
 {
     _userManager           = userManager;
     _signInManager         = signInManager;
     _logger                = logger;
     _emailSender           = emailSender;
     _environmentAppService = environmentAppService;
 }
        //private readonly UserManager<ApplicationUserViewModel> _userManager;

        public CulturalExchangeController(/*UserManager<ApplicationUserViewModel> userManager,*/
            IApplicationUserAppService applicationUserAppService,
            ICulturalExchangeAppService culturalExchangeAppService,
            IStudentAppService studentAppService, ICollegeAppService collegeAppService,
            IEnvironmentAppService environmentAppService, IAccomodationAppService accomodationAppService,
            ICollegeTimeAppService collegeTimeAppService, IReceivePaymentCulturalExchangeAppService receivePaymentAppService
            )
        {
            _applicationUserAppService  = applicationUserAppService;
            _culturalExchangeAppService = culturalExchangeAppService;
            _studentAppService          = studentAppService;
            _collegeAppService          = collegeAppService;
            _collegeTimeAppService      = collegeTimeAppService;
            //_userManager = userManager;
            _environmentAppService    = environmentAppService;
            _accomodationAppService   = accomodationAppService;
            _receivePaymentAppService = receivePaymentAppService;
        }
 public async Task <IActionResult> GetEnvironmentsAsync([FromServices] IEnvironmentAppService environmentAppService, string projectId)
 {
     return(Ok(await environmentAppService.GetByProjectAsync(projectId)));
 }
        public async Task <IActionResult> PostAsync([FromServices] IEnvironmentAppService environmentAppService, [FromBody] Environment environment)
        {
            await environmentAppService.CreateAsync(environment);

            return(Created($"{Request.Path}", environment));
        }
Exemplo n.º 8
0
 public EnvironmentsController(IEnvironmentAppService environmentAppService)
 {
     this.environmentAppService = environmentAppService;
 }
 public EnvironmentController(IEnvironmentAppService environmentApp)
 {
     _environmentAppService = environmentApp;
 }