예제 #1
0
 public IQueryable <T> GetAll()
 {
     using (var db = new osu2008Entities1())
     {
         return(db.Set <T>().ToList().AsQueryable());
     }
 }
예제 #2
0
 public void Create(EventSet _event)
 {
     using (var db = new osu2008Entities1())
     {
         var _entity = _event;
         db.Set <EventSet>().Add(_entity);
         db.SaveChanges();
     }
 }
예제 #3
0
 public void Create(T entity)
 {
     using (var db = new osu2008Entities1())
     {
         var _entity = entity;
         db.Set <T>().Add(_entity);
         db.SaveChanges();
     }
 }