public IHttpActionResult ReOpenToDoItem(ChangeToDoItemImportanceModel model)
        {
            if (!ModelState.IsValid)
                return BadRequest(ModelState);

            try
            {
                Worker.ChangeImportance(model);
                return Ok();
            }
            catch (Exception ex)
            {
                return BadRequest(ex.Message);
            }
        }
Esempio n. 2
0
 public void ChangeImportance(ChangeToDoItemImportanceModel model)
 {
     string todoItemId = database.IdMaps.GetAggregateId<ToDoItem>(int.Parse(model.Id)).ToString();
     bus.Send<ChangeToDoItemImportanceCommand>(new ChangeToDoItemImportanceCommand(todoItemId, model.Importance));
 }