Пример #1
0
        public IHttpActionResult CreateNewList(CreateTodoListCommandModel model)
        {
            if (!ModelState.IsValid)
                return BadRequest(ModelState);

            try
            {
                Worker.CreateToDoList(model);
                return Ok();
            }
            catch (Exception ex)
            {
                return BadRequest(ex.Message);
            }
        }
Пример #2
0
 public void CreateToDoList(CreateTodoListCommandModel model)
 {
     bus.Send<CreateToDoListCommand>(new CreateToDoListCommand(model.Id, model.Title, model.Description));
 }