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