// SaveModel attempts add the given model to database.
SaveModel attempts add the given model to database.
// SaveModel attempts add the given model to database .
func (d *Database) SaveModel(model interface{}) error {
	err := d.DB.Insert(model)
	if err != nil {
		d.Error("SaveModel", "Model not saved", err)
		return errors.New("Could not create model")
	}
	d.Success("SaveModel", "Model saved successfully")
	return nil
}
func ( d * Database ) SaveModel ( model interface { } ) error { err := d . DB . Insert ( model ) if err != nil { d . Error ( " " , " " , err ) return errors . New ( " " ) } d . Success ( " " , " " ) return nil }
SaveModel attempts add the given model to database.
SaveModel attempts add the given model to database .