public void AddEntry(TodoEntry entry) { using (LoggerDbContext loggerDatabase = new LoggerDbContext()) { loggerDatabase.TodoEntries.Add(entry); loggerDatabase.SaveChanges(); } }
public void AddEntry(TodoEntry entry) { using (LoggerDbContext loggerDatabase = new LoggerDbContext()) { loggerDatabase.TodoEntries.Add(entry); loggerDatabase.SaveChanges(); } }
public void RemoveEntry(UInt32 id) { using(LoggerDbContext loggerDatabase = new LoggerDbContext()) { List<TodoEntry> availableEntries = loggerDatabase.TodoEntries.ToList(); loggerDatabase.TodoEntries.Remove(availableEntries[(int) id]); loggerDatabase.SaveChanges(); } }
public void RemoveEntry(UInt32 id) { using (LoggerDbContext loggerDatabase = new LoggerDbContext()) { List <TodoEntry> availableEntries = loggerDatabase.TodoEntries.ToList(); loggerDatabase.TodoEntries.Remove(availableEntries[(int)id]); loggerDatabase.SaveChanges(); } }