public async Task <ActionResult> Update([FromBody] Schedule data) { if (await scheduleLogic.FindByIdAsync(data.ScheduleId) == null) { return(NotFound()); } if (await scheduleLogic.UpdateAsync(data)) { return(Ok(await scheduleLogic.FindByIdAsync(data.ScheduleId))); } return(BadRequest("Error Processing request!")); }