Additional functionality on Repository generation so that methods and calls to db are generated from definition