generic mongo db repository