{"id":13604486,"url":"https://github.com/elixneto/CollectionMapper.RavenDB.NetCore","last_synced_at":"2025-04-12T02:30:44.687Z","repository":{"id":116620312,"uuid":"212830538","full_name":"elixneto/CollectionMapper.RavenDB.NetCore","owner":"elixneto","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-30T18:44:21.000Z","size":86,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T09:36:18.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/elixneto.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-10-04T14:12:34.000Z","updated_at":"2024-06-26T11:03:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3d3a807-9126-4195-adc8-6702fa0bc15b","html_url":"https://github.com/elixneto/CollectionMapper.RavenDB.NetCore","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/elixneto%2FCollectionMapper.RavenDB.NetCore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixneto%2FCollectionMapper.RavenDB.NetCore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixneto%2FCollectionMapper.RavenDB.NetCore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixneto%2FCollectionMapper.RavenDB.NetCore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixneto","download_url":"https://codeload.github.com/elixneto/CollectionMapper.RavenDB.NetCore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506901,"owners_count":21115503,"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-08-01T19:00:46.563Z","updated_at":"2025-04-12T02:30:44.458Z","avatar_url":"https://github.com/elixneto.png","language":"C#","readme":"\u003cimage width=\"150px\" src=\"https://github.com/elixneto/CollectionMapper.RavenDB.NetCore/blob/master/src/CollectionMapper.RavenDB.NetCore/logo.png\" /\u003e\n\n# CollectionMapper.RavenDB.NetCore\nAn easy way to map your entities classes to RavenDB collections for .NET applications\n\n## Wiki\nFull Documentation: \u003cbr\u003e\nhttps://github.com/elixneto/CollectionMapper.RavenDB.NetCore/wiki\n\n## Easy to use\n```csharp\npublic class MyCustomMapper : RavenDBCollectionMapper\n{\n    public MyCustomMapper()\n    {\n        Map\u003cAccount\u003e(\"MyUniqueAccounts\");\n        Map\u003cBank\u003e(\"SuperSpecialBanks\");\n        Map\u003cUser\u003e(\"USER\");\n        Map(\"Fruits\", typeof(Apple), typeof(Banana), typeof(Strawberry));\n        ...\n        ...\n    }\n}\n\npublic class RavenDBDocumentStoreHolderExample\n{\n    private readonly MyCustomMapper myCustomMapper = new MyCustomMapper();\n\n    private static Lazy\u003cIDocumentStore\u003e store = new Lazy\u003cIDocumentStore\u003e(CreateStore);\n    public static IDocumentStore Store =\u003e store.Value;\n    private static IDocumentStore CreateStore()\n    {\n        /* you can ignore private properties of your entities classes */\n        myCustomMapper.IncludeNonPublicProperties(false);\n\n        IDocumentStore store = new DocumentStore\n        {\n                Urls = new[] { \"http://your_RavenDB_cluster_node\" },\n                Database = \"your_RavenDB_database_name\",\n                \n                Conventions = {\n                    /* Here you set the collection mapper */\n                    FindCollectionName = (type) =\u003e myCustomMapper.FindCollectionBy(type),\n\n                    /* Here you can use the contract resolver to ignore the private properties */\n                    Serialization = new NewtonsoftJsonSerializationConventions\n                    {\n                        JsonContractResolver  = myCustomMapper.GetPropertiesContract()\n                    }\n                }\n\n        }.Initialize();\n\n        return store;\n    }\n}\n```\n","funding_links":[],"categories":["Libraries and Frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixneto%2FCollectionMapper.RavenDB.NetCore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixneto%2FCollectionMapper.RavenDB.NetCore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixneto%2FCollectionMapper.RavenDB.NetCore/lists"}