{"id":19990839,"url":"https://github.com/roydukkey/Dado.ComponentModel.Mutations","last_synced_at":"2025-05-04T10:30:46.719Z","repository":{"id":66188640,"uuid":"56001283","full_name":"roydukkey/Dado.ComponentModel.Mutations","owner":"roydukkey","description":"Provides attributes that are used to help ensure data integrity for objects used as data sources.","archived":true,"fork":false,"pushed_at":"2018-11-01T01:45:26.000Z","size":128,"stargazers_count":8,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T06:43:53.188Z","etag":null,"topics":["c-sharp","component-model","data-annotations","data-attributes"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Dado.ComponentModel.Mutations","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roydukkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2016-04-11T19:30:03.000Z","updated_at":"2024-09-05T19:07:34.000Z","dependencies_parsed_at":"2023-02-22T17:30:50.335Z","dependency_job_id":null,"html_url":"https://github.com/roydukkey/Dado.ComponentModel.Mutations","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydukkey%2FDado.ComponentModel.Mutations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydukkey%2FDado.ComponentModel.Mutations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydukkey%2FDado.ComponentModel.Mutations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydukkey%2FDado.ComponentModel.Mutations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roydukkey","download_url":"https://codeload.github.com/roydukkey/Dado.ComponentModel.Mutations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252319989,"owners_count":21729052,"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":["c-sharp","component-model","data-annotations","data-attributes"],"created_at":"2024-11-13T04:51:29.648Z","updated_at":"2025-05-04T10:30:46.700Z","avatar_url":"https://github.com/roydukkey.png","language":"C#","readme":"# Dado.ComponentModel.Mutations\n\nProvides attributes that are used to help ensure data integrity for objects used as data sources.\n\nNuGet: https://www.nuget.org/packages/Dado.ComponentModel.Mutations\n\n\n## Sample Usage\n\nThe following class shows that a property should be converted to lowercase and replaced of invalid characters.\n\n```csharp\nusing System.Text.RegularExpressions;\n\npublic class User\n{\n\tprivate string _userName;\n\n\tpublic string UserName {\n\t\tget {\n\t\t\treturn _userName;\n\t\t}\n\t\tset {\n\t\t\tvalue = value.ToLower();\n\n\t\t\t_userName = Regex.Replace(value, @\"[^a-z0-9._]\", String.Empty);\n\t\t}\n\t}\n}\n```\n\nAltering the example to use a mutation attributes will produce the following code.\n\n```csharp\nusing Dado.ComponentModel.DataMutations;\n\npublic class User\n{\n\t[\n\t\tToLower,\n\t\tRegexReplace(@\"[^a-z0-9._]\")\n\t]\n\tpublic string UserName { get; set; }\n}\n```\n\nNow, when `Mutator.Mutate(context);` is executed the value of `User.UserName` will be lowercased and have all invalid characters replaced.\n\n[API Documentation](Documentation/README.md#documentation-index)\n\n\n## Further Development\n\n~~This project is still initial development. APIs have been submitted to [dotnet/corefx#7660](https://www.github.com/dotnet/corefx/issues/7660) for review and are likely to change.~~\n\n\n## License\n\nDado.ComponentModel.Mutations is licensed under the [Apache License, Version 2.0](LICENSE).\n","funding_links":[],"categories":["C\\#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froydukkey%2FDado.ComponentModel.Mutations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froydukkey%2FDado.ComponentModel.Mutations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froydukkey%2FDado.ComponentModel.Mutations/lists"}