public IActionResult CreateNewPost([FromBody] Post post) { try { _data.Post.Create(post); _data.Save(); return(Created("Post", post)); } catch { return(StatusCode(500, "Internal server error")); } }