public async Task <IActionResult> Create([FromBody] DummyVm dummyVm) { var dummy = _mapper.Map <Dummy>(dummyVm); await _dummyService.Create(dummy); return(Ok()); }
public IActionResult Post([FromBody] CreateDummyViewModel vm) { return(ApiAction(() => { var contract = _mapper.Map <CreateDummyContract>(vm); var returnContract = _dummyService.Create(contract); return Created("Get", _mapper.Map <CreatedDummyViewModel>(returnContract)); })); }