Пример #1
0
 public ActionResult <ToDoListDTO> AddToDoList(ToDoListDTO todolist)
 {
     _logger.Info(() => "Api AddProduct");
     todolist.CreatedBy = (long)HttpContext.Request.HttpContext.Items["Userid"];
     todolist.UpdatedBy = (long)HttpContext.Request.HttpContext.Items["Userid"];
     _toDoListService.AddToDoList(todolist);
     return(StatusCode((int)HttpStatusCode.OK, todolist));
 }
 public async Task Post(ToDoListContainer toDoList)
 {
     try
     {
         await _toDoListService.AddToDoList(toDoList);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
 /// <summary>
 /// Adds to do list.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <returns></returns>
 public ToDoListDTO AddToDoList(ToDoListDTO item)
 {
     return(_todoListService.AddToDoList(item));
 }
Пример #4
0
 public async Task Post(ToDoListContainer toDoList)
 {
     await _toDoListService.AddToDoList(toDoList);
 }