public void Remove(Todo todo)
        {
            todo.IsRemoved = true;

            this.todos.Update(todo);
            this.todos.SaveChanges();
        }
        public int Add(string title, string text, int categoryId)
        {
            var todo = new Todo()
            {
                Title = title,
                Text = text,
                CategoryId = categoryId,
                LastChange = DateTime.Now
            };

            this.todos.Add(todo);
            this.todos.SaveChanges();

            return todo.Id;
        }
 public void Update(Todo todo)
 {
     this.todos.Update(todo);
     this.todos.SaveChanges();
 }