Esempio n. 1
0
        public async Task <IActionResult> DeleteAsync(int id)
        {
            var result = await trainerService.DeleteAsync(id);

            if (!result.Success)
            {
                return(BadRequest(result.Message));
            }

            var trainerResource = mapper.Map <Trainer, TrainerResource>(result.Trainer);

            return(Ok(trainerResource));
        }