Where are the FaunaDB functions called "Delete" and "Collections"?

I’m a noob at FaunaDB. I have successfully added a collection to a database and have queried a record from that collection. Now I want to delete the collection. I have followed the example here but on both the Delete and Collection functions, it says "The name ‘Delete/Collection’ does not exist in the current context"

I have these using at the top of the code.

using FaunaClient = FaunaDB.Client;
using FaunaTypes = FaunaDB.Types;

enter image description here

I’ve made sure my NuGet packages are all on the latest versions. I’ve tried dot-walking all the classes in FaunaDB to find them but to no avail. What gives?

>Solution :

The methods you’re trying to access are all static methods on the Language struct. To access them in the way shown in the FaunaDB tutorials, you need to add a static reference to FaunaDB.Query.Language:

using static FaunaDB.Query.Language;

Leave a Reply