{"id":22343828,"url":"https://github.com/imaun/dade","last_synced_at":"2025-03-26T10:11:58.190Z","repository":{"id":90763643,"uuid":"246831145","full_name":"imaun/dade","owner":"imaun","description":"\"Dade\" is an implementation of UnitOfWork and Repository pattern over Dapper mini-ORM.","archived":false,"fork":false,"pushed_at":"2020-09-27T13:49:28.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-29T19:46:59.112Z","etag":null,"topics":["csharp","dapper","data-access","dotnet","dotnet-core","mini-orm","orm","repository","repository-pattern","unitofwork","uow-pattern"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imaun.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}},"created_at":"2020-03-12T12:40:44.000Z","updated_at":"2021-06-16T07:57:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec241b41-e151-4a80-b951-ed7e2b3b7eb7","html_url":"https://github.com/imaun/dade","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":0.6,"last_synced_commit":"898bd8596dbae92984c3902a63607aad101d3ebf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imaun%2Fdade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imaun%2Fdade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imaun%2Fdade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imaun%2Fdade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imaun","download_url":"https://codeload.github.com/imaun/dade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245632424,"owners_count":20647193,"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","dapper","data-access","dotnet","dotnet-core","mini-orm","orm","repository","repository-pattern","unitofwork","uow-pattern"],"created_at":"2024-12-04T09:06:21.372Z","updated_at":"2025-03-26T10:11:58.161Z","avatar_url":"https://github.com/imaun.png","language":"C#","readme":"# Dade\n\"Dade\" is implementation of [UnitOfWork](https://www.martinfowler.com/eaaCatalog/unitOfWork.html) and \n[Repository](https://martinfowler.com/eaaCatalog/repository.html) pattern over [Dapper](https://github.com/StackExchange/Dapper) mini-ORM. \nDade provides EntityFramework's like way for working with data using Dapper mini-ORM.\nYou can use this library to achieve UnitOfWork and Repository pattern with Dapper to create your Data-Access layer in some way like EF.\n\n# Sample usage\nFirst thing first, install it via NuGet :\n```Install-Package imun.Dade```\n\n In your data-access layer project, create repository or `DataSet` for each of your entities. Suppose you have two entities `Blog` and `Post`. Add two class named `BlogSet` and `PostSet` which will inherits from `DadeSet` class.\n```c#\nusing imun.Dade;\nnamespace Blog.Core.Data.Repositories\n{\n    public class BlogSet: DadeSet\u003cBlog, int\u003e\n    {\n        protected BlogSet(IDbTransaction transaction) : base(transaction)\n        {\n        }\n    }\n}\n```\n```c#\nusing imun.Dade;\nnamespace Blog.Core.Data.Repositories\n{\n    public class PostSet: DadeSet\u003cPost, int\u003e\n    {\n        protected PostSet(IDbTransaction transaction) : base(transaction)\n        {\n        }\n    }\n}\n```\nWell, that's it for repositories! Now add another class named `DbContext` or something like that to act as DbContext!\n\n```c#\npublic class DbContext: DadeContext\n{\n    public DbContext(IUnitOfWorkFactory unitOfWorkFactory) : base(unitOfWorkFactory)\n    {\n    }\n\n    public BlogSet Blogs { get; set; }\n    public PostSet Posts { get; set; }\n}\n```\n\n## About\n`Dade` means Data in Farsi!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimaun%2Fdade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimaun%2Fdade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimaun%2Fdade/lists"}