public async Task <IActionResult> DeleteAsync(int id) { var result = await modeService.DeleteAsync(id); if (!result.IsSuccess) { return(BadRequest(result.Message)); } var modeResource = mapper.Map <Mode, ModeResource>(result.internalValue); return(Ok(modeResource)); }