{"id":13629558,"url":"https://github.com/dasMulli/data-builder-generator","last_synced_at":"2025-04-17T09:34:37.030Z","repository":{"id":60445239,"uuid":"274395993","full_name":"dasMulli/data-builder-generator","owner":"dasMulli","description":"Code generator to easily create data builder patterns for your model classes","archived":false,"fork":false,"pushed_at":"2024-09-03T21:18:48.000Z","size":47,"stargazers_count":117,"open_issues_count":7,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-07T14:21:16.678Z","etag":null,"topics":["builder-patterns","csharp-sourcegenerator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dasMulli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-23T12:10:01.000Z","updated_at":"2025-03-19T14:37:58.000Z","dependencies_parsed_at":"2024-01-06T02:09:56.302Z","dependency_job_id":"9830ad90-1e11-4cc0-9c8d-ad391404ea1b","html_url":"https://github.com/dasMulli/data-builder-generator","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"b7ad16ebe44cb52b01d246287cbd9f9eca2946e7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasMulli%2Fdata-builder-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasMulli%2Fdata-builder-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasMulli%2Fdata-builder-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasMulli%2Fdata-builder-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dasMulli","download_url":"https://codeload.github.com/dasMulli/data-builder-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249331882,"owners_count":21252662,"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":["builder-patterns","csharp-sourcegenerator"],"created_at":"2024-08-01T22:01:13.560Z","updated_at":"2025-04-17T09:34:36.750Z","avatar_url":"https://github.com/dasMulli.png","language":"C#","readme":"# Data Builder Generator\n\nAllows to generate data builder patterns for your model classes.\n\nReference using Visual Studio 2019 16.6 or .NET CLI 3.1.500 / 5.0.100 or higher and opt into preview language features in your project file:\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cLangVersion\u003ePreview\u003c/LangVersion\u003e\n\u003c/PropertyGroup\u003e\n\n\u003cItemGroup\u003e\n  \u003cPackageReference Include=\"DasMulli.DataBuilderGenerator\" Version=\"*\" PrivateAssets=\"All\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n## Usage\n\nUse the `GenerateDataBuilder` attribute to annotate the classes you wish to generate builder patterns for. If your class has constructors, be sure that the parameter names can be resolved to the name of a property:\n\n```c#\n    using DasMulli.DataBuilderGenerator;\n\n    [GenerateDataBuilder]\n    public class Person\n    {\n        public string FirstName { get; set; }\n        public string? MiddleNames { get; set; }\n        public string LastName { get; set; }\n\n        public Person(string firstName, string? middleNames, string lastName)\n        {\n            FirstName = firstName;\n            MiddleNames = middleNames;\n            LastName = lastName;\n        }\n    }\n```\n\nThen you can use the generated builder class:\n\n```c#\nvar martinBuilder = new PersonBuilder()\n    .WithFirstName(\"Martin\")\n    .WithMiddleNames(\"Andreas\")\n    .WithLastName(\"Ullrich\");\n\nvar martin = martinBuilder.Build();\n\nvar otherMartin = martinBuilder.WithoutMiddleNames().WithLastName(\"Foo\").Build();\n```\n\n## Notes\n\nSpecial thanks to [Mayr-Melnhof Karton AG](https://www.mayr-melnhof.com/) for supporting the development of this project.\n","funding_links":[],"categories":["Do not want to test 112 ( old ISourceGenerator )","Source Generators","Bibliotecas úteis"],"sub_categories":["1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category","Patterns",".NET"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdasMulli%2Fdata-builder-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FdasMulli%2Fdata-builder-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdasMulli%2Fdata-builder-generator/lists"}