public IActionResult Post([FromBody] ReviewRegistrationModelIn reviewRegistrationModelIn) { try { reviewLogic.AddReview(reviewRegistrationModelIn); return(Ok()); } catch (Exception e) { return(BadRequest("The accommodation name was not found")); } }
public void AddReview(ReviewRegistrationModelIn reviewRegistrationModelIn) { Review review = reviewRegistrationModelIn.ToEntity(); accommodationLogic.AddReview(review); }