public IActionResult SetVisits(string commercial, int visitId, string data) { bool result = false; if (data != null) { Visit visit = _visitService.GetVisits().Where(v => v.id == visitId).FirstOrDefault(); result = _visitService.SetVisit(commercial, data, visit); } if (result) { return(Ok()); } else { return(BadRequest()); } }