Ejemplo n.º 1
0
        public IHttpActionResult ChangeDescription(ChangeTodoListDescriptionCommandModel model)
        {
            if (!ModelState.IsValid)
                return BadRequest(ModelState);

            try
            {
                Worker.ChangeToDoListDescription(model);
                return Ok();
            }
            catch (Exception ex)
            {
                return BadRequest(ex.Message);
            }
        }
Ejemplo n.º 2
0
 public void ChangeToDoListDescription(ChangeTodoListDescriptionCommandModel model)
 {
     string todoListId = database.IdMaps.GetAggregateId<ToDoList>(int.Parse(model.Id)).ToString();
     bus.Send<ChangeToDoListDescriptionCommand>(new ChangeToDoListDescriptionCommand(todoListId, model.Description));
 }