Example #1
0
        public DatastoreDb CreateDatastoreDb(string namespaceId = null)
        {
            string effectiveNamespace = namespaceId ?? NamespaceId;
            var    builder            = new DatastoreDbBuilder
            {
                ProjectId         = ProjectId,
                NamespaceId       = effectiveNamespace,
                EmulatorDetection = EmulatorDetection.EmulatorOrProduction
            };

            return(builder.Build());
        }
Example #2
0
        public static DatastoreDb Create()
        {
            var datastoreDbBuilder = new DatastoreDbBuilder()
            {
                ProjectId         = projectId,
                EmulatorDetection = EmulatorDetection.EmulatorOnly,
            };

            return(datastoreDbBuilder.Build());

            /*var client = DatastoreClient.Create(new Channel(emulatorHost, emulatorPort, ChannelCredentials.Insecure));
             * return DatastoreDb.Create(projectId, namespaceId, client);*/
        }