public string SaveToDoItem(Contract.ToDoItemContract toDoItemContract) { try { ToDoItemEntityBuilder builder = new ToDoItemEntityBuilder(); return(ToDoItemService.Save(builder.Build(toDoItemContract))); } catch (Exception ex) { throw ex; } }
public async Task <OperationResult> Save(ToDoItem toDoItem) { var methodBase = System.Reflection.MethodBase.GetCurrentMethod(); var operationResult = OperationResult.ForError(Core.Enums.OperationResultMessage.Error, methodBase); try { SetStatusForNewToDoItem(toDoItem); operationResult = await toDoItemDbService.Save(toDoItem); } catch (Exception ex) { operationResult = OperationResult.ForError(Core.Enums.OperationResultMessage.Error, methodBase, toDoItem, ex); } return(operationResult); }
public async Task <OperationResult> ToDoItemSave([FromBody] ToDoItem toDoItem) { OperationResult operationResult = await toDoItemService.Save(toDoItem); return(operationResult); }