示例#1
0
 public GenericRepository(CompanyDBEntities context)
 {
     this.context = context;
     this.dbSet   = context.Set <T>();
 }
示例#2
0
        public void Ajouter <T>(T entity) where T : class
        {
            context.Set <T>().Add(entity);

            context.SaveChanges();
        }