Пример #1
0
        public string SaveToDoItem(Contract.ToDoItemContract toDoItemContract)
        {
            try
            {
                ToDoItemEntityBuilder builder = new ToDoItemEntityBuilder();

                return(ToDoItemService.Save(builder.Build(toDoItemContract)));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        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);
        }
Пример #3
0
        public async Task <OperationResult> ToDoItemSave([FromBody] ToDoItem toDoItem)
        {
            OperationResult operationResult = await toDoItemService.Save(toDoItem);

            return(operationResult);
        }