public IActionResult Post([FromBody]TaskReminderModel reminder) { var reminderCommand = new TaskReminderCommand( taskId: reminder.TaskId, taskName: reminder.TaskName, dueDate: DateTime.Parse(reminder.DueDate), recipient: reminder.Recipient, copyTo: reminder.CopyTo ); _commandProcessor.Post(reminderCommand); return new StatusCodeResult(202) ; }
public OperationResult Post(TaskReminderModel reminder) { var reminderCommand = new TaskReminderCommand( taskName: reminder.TaskName, dueDate: DateTime.Parse(reminder.DueDate), recipient: reminder.Recipient, copyTo: reminder.CopyTo ); _commandProcessor.Post(reminderCommand); return new OperationResult.OK() { StatusCode = (int)HttpStatusCode.Accepted }; }