예제 #1
0
        public async Task AddAsync(string description)
        {
            var item = new TodoItem()
            {
                Description = description,
                CreatedDate = DateTime.UtcNow
            };

            dbContext.Add(item);
            await dbContext.SaveChangesAsync();
        }
 public void AddTodoItem(TodoItem todoItem)
 {
     _context.Add(todoItem);
 }