public GenericRepository(CompanyDBEntities context) { this.context = context; this.dbSet = context.Set <T>(); }
public void Ajouter <T>(T entity) where T : class { context.Set <T>().Add(entity); context.SaveChanges(); }