예제 #1
0
 public IEnumerable<TodoEntry> GetEntries()
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         return loggerDatabase.TodoEntries.ToList();
     }
 }
예제 #2
0
 public IEnumerable <TodoEntry> GetEntries()
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         return(loggerDatabase.TodoEntries.ToList());
     }
 }
예제 #3
0
 public void AddEntry(TodoEntry entry)
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         loggerDatabase.TodoEntries.Add(entry);
         loggerDatabase.SaveChanges();
     }
 }
예제 #4
0
 public void AddEntry(TodoEntry entry)
 {
     using (LoggerDbContext loggerDatabase = new LoggerDbContext())
     {
         loggerDatabase.TodoEntries.Add(entry);
         loggerDatabase.SaveChanges();
     }
 }
예제 #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();
     }
 }
예제 #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();
     }
 }