public ActionResult <Follow> Create(Follow follow) { try { _service.Create(follow); _service.SaveChanges(); return(CreatedAtRoute(nameof(GetFollowById), new { Id = follow.FollowId }, follow)); } catch (AppException ex) { // return error message if there was an exception return(BadRequest(new { message = ex.Message })); } }