{"id":19992155,"url":"https://github.com/JoshClose/FluentDatabase","last_synced_at":"2025-05-04T11:30:42.173Z","repository":{"id":639323,"uuid":"281002","full_name":"JoshClose/FluentDatabase","owner":"JoshClose","description":"A .NET library created in C# to fluently create any type of database","archived":false,"fork":false,"pushed_at":"2009-08-20T19:27:20.000Z","size":136,"stargazers_count":79,"open_issues_count":0,"forks_count":26,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-04T09:04:57.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"ms-pl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoshClose.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-08-18T14:35:00.000Z","updated_at":"2025-02-16T04:53:42.000Z","dependencies_parsed_at":"2022-07-18T12:19:31.972Z","dependency_job_id":null,"html_url":"https://github.com/JoshClose/FluentDatabase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshClose%2FFluentDatabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshClose%2FFluentDatabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshClose%2FFluentDatabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoshClose%2FFluentDatabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoshClose","download_url":"https://codeload.github.com/JoshClose/FluentDatabase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252329132,"owners_count":21730555,"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":[],"created_at":"2024-11-13T04:52:03.424Z","updated_at":"2025-05-04T11:30:41.683Z","avatar_url":"https://github.com/JoshClose.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"FluentDatabase is a library to fluently create a number of different database types.\n\nCurrently supported databases are:\n\n- Access\n- Firebird\n- MySQL\n- Oracle\n- PostgreSQL\n- SQLite\n- SQLServer\n\nExample:\n\n\u003cpre\u003e\u003ccode\u003e\nDatabaseFactory.Create( databaseType )\n\t.WithName( \"Business\" )\n\t.UsingSchema( \"Test\" )\n\t.HasTable(\n\ttable =\u003e table\n\t         \t.WithName( \"Companies\" )\n\t         \t.HasColumn(\n\t         \tcolumn =\u003e column.WithName( \"Id\" ).OfType( SqlDbType.Int ).IsAutoIncrementing()\n\t         \t          \t.HasConstraint( constraint =\u003e constraint.OfType( ConstraintType.NotNull ) )\n\t         \t          \t.HasConstraint(\n\t         \t          \tconstraint =\u003e constraint.OfType( ConstraintType.PrimaryKey ).WithName( \"PK_Companies_Id\" ) )\n\t         \t)\n\t         \t.HasColumn(\n\t         \tcolumn =\u003e column.WithName( \"Name\" ).OfType( SqlDbType.NVarChar, 100 )\n\t         \t          \t.HasConstraint( constraint =\u003e constraint.OfType( ConstraintType.NotNull ) )\n\t         \t)\n\t)\n\t.HasTable(\n\ttable =\u003e table\n\t         \t.WithName( \"Employees\" )\n\t         \t.HasColumn(\n\t         \tcolumn =\u003e column.WithName( \"Id\" ).OfType( SqlDbType.Int ).IsAutoIncrementing()\n\t         \t          \t.HasConstraint( constraint =\u003e constraint.OfType( ConstraintType.NotNull ) )\n\t         \t          \t.HasConstraint(\n\t         \t          \tconstraint =\u003e constraint.OfType( ConstraintType.PrimaryKey ).WithName( \"PK_Employees_Id\" ) )\n\t         \t)\n\t         \t.HasColumn(\n\t         \tcolumn =\u003e column.WithName( \"CompanyId\" ).OfType( SqlDbType.Int )\n\t         \t          \t.HasConstraint( constraint =\u003e constraint.OfType( ConstraintType.NotNull ) )\n\t         \t          \t.HasConstraint(\n\t         \t          \tconstraint =\u003e\n\t         \t          \tconstraint.WithName( \"FK_Employees_CompanyId\" ).OfType( ConstraintType.ForeignKey ).HasReferenceTo( \"Companies\", \"Id\" ) )\n\t         \t)\n\t         \t.HasColumn(\n\t         \tcolumn =\u003e column.WithName( \"Name\" ).OfType( SqlDbType.NVarChar, 50 )\n\t         \t          \t.HasConstraint( constraint =\u003e constraint.OfType( ConstraintType.NotNull ) )\n\t         \t)\n\t         \t.HasColumn(\n\t         \tcolumn =\u003e column.WithName( \"Bio\" ).OfType( SqlDbType.NVarChar, ColumnSize.Max )\n\t         \t)\n\t).Write( writer );\n\u003c/code\u003e\u003c/pre\u003e\n\nCreates the script:\n\n\u003cpre\u003e\u003ccode\u003e\nUSE [Business]\n\nCREATE TABLE [Test].[Companies]\n(\n\t[Id] INT IDENTITY NOT NULL CONSTRAINT [PK_Companies_Id] PRIMARY KEY,\n\t[Name] NVARCHAR ( 100 ) NOT NULL,\n)\n\nCREATE TABLE [Test].[Employees]\n(\n\t[Id] INT IDENTITY NOT NULL CONSTRAINT [PK_Employees_Id] PRIMARY KEY,\n\t[CompanyId] INT NOT NULL CONSTRAINT [FK_Employees_CompanyId] FOREIGN KEY REFERENCES [Test].[Companies] ( [Id] ),\n\t[Name] NVARCHAR ( 50 ) NOT NULL,\n\t[Bio] NVARCHAR ( MAX ),\n)\n\u003c/code\u003e\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoshClose%2FFluentDatabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJoshClose%2FFluentDatabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoshClose%2FFluentDatabase/lists"}