private static async Task SetupInitialDocuments() { var confExists = await _coll.ExistsAsync("dataLove2021"); if (confExists.Exists) { return; } var confActivitiesExists = await _coll.ExistsAsync("dataLove2021::activities"); if (confActivitiesExists.Exists) { return; } await _coll.InsertAsync("dataLove2021", new Conference { Name = "Data Love 2021", Location = "https://datalove.konfy.care/" }); await _coll.InsertAsync("dataLove2021::activities", new ConferenceActivities { ConferenceId = "dataLove2021", Events = new List <ConferenceEvent>() }); }
/// <inheritdoc/> public async Task <bool> IsLockedAsync(string resource) { var existsResult = await _couchbaseCollection.ExistsAsync(resource) .ConfigureAwait(false); return(existsResult.Exists); }
public static Task <IExistsResult> ExistsAsync(this ICouchbaseCollection collection, string id, Action <ExistsOptions> configureOptions) { var options = new ExistsOptions(); configureOptions?.Invoke(options); return(collection.ExistsAsync(id, options)); }
public static Task <IExistsResult> ExistsAsync(this ICouchbaseCollection collection, string id) { return(collection.ExistsAsync(id, ExistsOptions.Default)); }