public async Task <IActionResult> OnPost() { var company = ObjectMapper.Map <CreateCompanyViewModel, CreateCompanyDto>(Company); await _companyAppService.CreateAsync(company); return(RedirectToPage("/Companies/Index")); }
public async Task <IActionResult> OnPostAsync() { await _companyAppService.CreateAsync(Company); return(NoContent()); }
public async Task <IActionResult> Post([FromBody] CompanyDto CompanyDto) { CompanyDto = await _appService.CreateAsync(CompanyDto); return(CreateResponseOnPost(CompanyDto, _name)); }