public async Task <ActionResult> Insert([FromBody] Schedule data) { try { if (await scheduleLogic.InsertAsync(data)) { return(CreatedAtAction(nameof(Get), new { id = data.ScheduleId }, data)); } return(BadRequest("Error processing request!")); } catch (ArgumentException) { return(Conflict(data)); } }