public async Task <IActionResult> PostAsync([FromBody] Point point) { if (!ModelState.IsValid) { return(BadRequest(ModelState.GetErrorMessages())); } //var point = _mapper.Map<SavePointResource, Point> (resource); var result = await _pointService.SaveAsync(point); if (!result.Success) { return(BadRequest(result.Message)); } //var pointResource = _mapper.Map<Point, PointResource> (result.Point); return(Ok(result)); }