Example #1
0
        public IHttpActionResult ReOpenToDoItem(ReOpenToDoItemModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                Worker.ReOpenToDoItem(model);
                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
        public void ReOpenToDoItem(ReOpenToDoItemModel model)
        {
            string todoItemId = database.IdMaps.GetAggregateId <ToDoItem>(int.Parse(model.Id)).ToString();

            bus.Send <ReOpenToDoItemCommand>(new ReOpenToDoItemCommand(todoItemId));
        }