public IActionResult PostPhoto([FromBody] PhotoEntity photo) { if (photo == null) { return(BadRequest()); } _photoService.CreatePhoto(photo); return(CreatedAtAction(nameof(GetPhoto), new { photo = photo }, photo)); }