public async Task <ActionResult> PostScheduleAsync([FromBody] ScheduleViewModel model) { try { if (!ModelState.IsValid) { return(BadRequest()); } await _logic.PostAsync(model); return(Ok()); } catch (Exception e) { return(StatusCode(500, e)); } }