Esempio n. 1
0
 public async Task UpdateAsync(TodoModel modifiedTodo)
 {
     _context.Todos.Update(modifiedTodo);
     await _context.SaveChangesAsync();
 }
Esempio n. 2
0
 public async Task AddAsync(TodoModel newTodo)
 {
     newTodo.CreationDate = newTodo.LastEditDate = DateTime.Now;
     _context.Todos.Add(newTodo);
     await _context.SaveChangesAsync();
 }