{"id":16440792,"url":"https://github.com/idevelopthings/surrealdbdrivernet","last_synced_at":"2025-06-22T14:08:59.724Z","repository":{"id":64917325,"uuid":"579492498","full_name":"iDevelopThings/SurrealDbDriverNet","owner":"iDevelopThings","description":"C# Database Library for interacting/using SurrealDB","archived":false,"fork":false,"pushed_at":"2022-12-18T20:09:19.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T14:08:53.013Z","etag":null,"topics":["csharp","surrealdb"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/SurrealDb.Driver/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iDevelopThings.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-17T21:47:34.000Z","updated_at":"2022-12-17T21:53:39.000Z","dependencies_parsed_at":"2023-01-29T20:00:35.310Z","dependency_job_id":null,"html_url":"https://github.com/iDevelopThings/SurrealDbDriverNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iDevelopThings/SurrealDbDriverNet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDevelopThings%2FSurrealDbDriverNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDevelopThings%2FSurrealDbDriverNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDevelopThings%2FSurrealDbDriverNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDevelopThings%2FSurrealDbDriverNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iDevelopThings","download_url":"https://codeload.github.com/iDevelopThings/SurrealDbDriverNet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iDevelopThings%2FSurrealDbDriverNet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261304267,"owners_count":23138301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","surrealdb"],"created_at":"2024-10-11T09:13:04.676Z","updated_at":"2025-06-22T14:08:54.710Z","avatar_url":"https://github.com/iDevelopThings.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SurrealDb Driver\n\nAn un-official driver for the SurrealDb database.\n\nExample usage:\n\n```csharp\nusing SurrealDb.Driver;\n\nDatabase.Configure(config =\u003e\n{\n    config.Address      = \"http://127.0.0.1:8082\";\n    config.DatabaseName = \"test\";\n    config.Namespace    = \"test\";\n    config.AuthUsername = \"root\";\n    config.AuthPassword = \"root\";\n});\nDatabase.Initialize();\nawait Database.Connect();\n```\n\n# Create a model\n\n```csharp\n[Model(\"users\")]\npublic class User : SurrealModel\u003cUser\u003e\n{\n    public string Name { get; set; }\n    public string Email { get; set; }\n    public int Age { get; set; }\n}\n```\n\n# Run queries\n\n```csharp\nusing SurrealDb.Driver;\n\nvar result = await Database.Query\u003cUser\u003e(\"SELECT * FROM users;\");\n\n// When expecting one user:\nvar user = result!.First();\n// When expecting multiple users:\nvar users = result!.Get();\n```\n\n# Using the model for queries\nThis is a work in progress, but it will be more like a laravel query builder instance :)\n\n```csharp\nusing SurrealDb.Driver;\n\n// Returns multiple users where name = john\nUser.Query().Where(\"name\", \"John\").Get(); // = List\u003cUser\u003e\n// Returns first user where name = john\nUser.Query().Where(\"name\", \"John\").First(); // = User\n\nvar john = await User.Create(new(){ Name = \"John\" });\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidevelopthings%2Fsurrealdbdrivernet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidevelopthings%2Fsurrealdbdrivernet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidevelopthings%2Fsurrealdbdrivernet/lists"}