public bool EndTask([FromBody] UpdateWorkOrderTaskModel value) { try { var endTime = (value.Timestamp != null)?value.Timestamp:DateTime.Now; return(db.EndTask(value.TaskId, endTime)); } catch (Exception) { throw; } }