public async Task <IActionResult> OnPost()
        {
            var company = ObjectMapper.Map <CreateCompanyViewModel, CreateCompanyDto>(Company);
            await _companyAppService.CreateAsync(company);

            return(RedirectToPage("/Companies/Index"));
        }
Esempio n. 2
0
        public async Task <IActionResult> OnPostAsync()
        {
            await _companyAppService.CreateAsync(Company);

            return(NoContent());
        }
Esempio n. 3
0
        public async Task <IActionResult> Post([FromBody] CompanyDto CompanyDto)
        {
            CompanyDto = await _appService.CreateAsync(CompanyDto);

            return(CreateResponseOnPost(CompanyDto, _name));
        }