public void EditTodoItem(TodoItem item) { try { if (item == null || string.IsNullOrWhiteSpace(item.Name) || string.IsNullOrWhiteSpace(item.Notes)) { throw new FaultException("TodoItem name and notes fields are required"); } var todoItem = todoService.Find(item.ID); if (todoItem != null) { todoService.UpdateData(item); } else { throw new FaultException("TodoItem not found"); } } catch (Exception ex) { throw new FaultException(string.Format("Error: {0}", ex.Message)); } }