Esempio n. 1
0
 public void Add(BookedItem entity)
 {
     using (var dbContext = new PoREntities(ConnectionString))
     {
         dbContext.BookedItems.Add(entity);
         dbContext.SaveChanges();
     }
 }
Esempio n. 2
0
 public void Update(BookedItem entity)
 {
     using (var dbContext = new PoREntities(ConnectionString))
     {
         // We could turn this into an upsert
         dbContext.BookedItems.Attach(entity);
         dbContext.Entry(entity).State = EntityState.Modified;
         dbContext.SaveChanges();
     }
 }
Esempio n. 3
0
 public void Delete(BookedItem entity)
 {
     DeleteItem(entity.BookedItemId);
 }