public IActionResult Add(Reminder reminder) { var result = _reminderService.Add(reminder); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public ActionResult <ReminderDto> Add(Reminder reminder) { var ServiceResult = _reminderListService.Add(reminder); if (ServiceResult.ResponseCode != ResponseCode.Success) { return(BadRequest(ServiceResult.Error)); } var result = new ReminderDto { Id = ServiceResult.Result.Id, Description = ServiceResult.Result.Description, Message = ServiceResult.Result.Message, DateDue = ServiceResult.Result.DateDue, UserId = ServiceResult.Result.UserId }; return(Ok(result)); }