Esempio n. 1
0
 public IEnumerable<TodoEntry> GetEntries()
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         return loggerDatabase.TodoEntries.ToList();
     }
 }
Esempio n. 2
0
 public IEnumerable <TodoEntry> GetEntries()
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         return(loggerDatabase.TodoEntries.ToList());
     }
 }
Esempio n. 3
0
 public void AddEntry(TodoEntry entry)
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         loggerDatabase.TodoEntries.Add(entry);
         loggerDatabase.SaveChanges();
     }
 }
Esempio n. 4
0
 public void AddEntry(TodoEntry entry)
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         loggerDatabase.TodoEntries.Add(entry);
         loggerDatabase.SaveChanges();
     }
 }
Esempio n. 5
0
 public void RemoveEntry(UInt32 id)
 {
     using(LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         List<TodoEntry> availableEntries = loggerDatabase.TodoEntries.ToList();
         loggerDatabase.TodoEntries.Remove(availableEntries[(int) id]);
         loggerDatabase.SaveChanges();
     }
 }
Esempio n. 6
0
 public void RemoveEntry(UInt32 id)
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         List <TodoEntry> availableEntries = loggerDatabase.TodoEntries.ToList();
         loggerDatabase.TodoEntries.Remove(availableEntries[(int)id]);
         loggerDatabase.SaveChanges();
     }
 }