Make generic the GetDatabase method