user := User{Name: "John", Age: 30} affected, err := engine.Insert(&user)
users := []User{{Name: "Mark", Age: 25}, {Name: "Sarah", Age: 28}} affected, err := engine.Insert(&users)This example creates a slice of User objects and uses the Insert method to add them all to the database at once. Both examples are using the go-xorm.xorm package to insert data into a database using the Session Insert method.