func DeleteOAuth2Application(id, userid int64) error {
	sess := x.NewSession()
	if err := sess.Begin(); err != nil {
		return err
	}
	if err := deleteOAuth2Application(sess, id, userid); err != nil {
		return err
	}
	return sess.Commit()
}
// DeleteOAuth2Application deletes the application with the given id and the grants and auth codes related to it. It checks if the userid was the creator of the app.
DeleteOAuth2Application deletes the application with the given id and the grants and auth codes related to it. It checks if the userid was the creator of the app.
// DeleteOAuth2Application deletes the application with the given id and the grants and auth codes related to it . It checks if the userid was the creator of the app .
func DeleteOAuth2Application(id, userid int64) error {
	sess := x.NewSession()
	if err := sess.Begin(); err != nil {
		return err
	}
	if err := deleteOAuth2Application(sess, id, userid); err != nil {
		return err
	}
	return sess.Commit()
}
func DeleteOAuth2Application ( id , userid int64 ) error { sess := x . NewSession ( ) if err := sess . Begin ( ) ; err != nil { return err } if err := deleteOAuth2Application ( sess , id , userid ) ; err != nil { return err } return sess . Commit ( ) }
DeleteOAuth2Application deletes the application with the given id and the grants and auth codes related to it.
DeleteOAuth2Application deletes the application with the given id and the grants and auth codes related to it .