protected BaseRepo(FirestoreConfig firestoreConfig, ILogger logger) { log = logger; config = firestoreConfig; if (config.Emulator) { if (string.IsNullOrEmpty(config.EmulatorUrl)) { throw new MissingFieldException(nameof(config.EmulatorUrl)); } var fb = new FirestoreDbBuilder { ProjectId = config.ProjectId, //Endpoint = config.EmulatorUrl, EmulatorDetection = EmulatorDetection.EmulatorOnly }; db = fb.Build(); return; } db = FirestoreDb.Create(config.ProjectId); }
private void Connect(FirestoreConfig firestoreConfig) { //connect here }
public FirestoreClient(IOptions <FirestoreConfig> options) { _config = options.Value; }
public BlogRepo(FirestoreConfig firestoreConfig, ILogger <BlogRepo> logger) : base(firestoreConfig, logger) { }