{"id":25660124,"url":"https://github.com/gpproton/axolotl","last_synced_at":"2025-10-13T20:04:58.640Z","repository":{"id":143727652,"uuid":"611918211","full_name":"gpproton/Axolotl","owner":"gpproton","description":"A personal shared project library for dotnet","archived":false,"fork":false,"pushed_at":"2024-12-15T17:57:37.000Z","size":312,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-05T16:51:26.610Z","etag":null,"topics":["aspnet-core","blazor","csharp","dotnet","dotnet-core","maui","razor"],"latest_commit_sha":null,"homepage":"http://axolotl.godwin.dev/","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/gpproton.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,"zenodo":null}},"created_at":"2023-03-09T20:11:57.000Z","updated_at":"2024-12-15T17:57:41.000Z","dependencies_parsed_at":"2024-01-13T07:01:34.948Z","dependency_job_id":"c757eee0-8f2a-499e-93f8-1b181a622d55","html_url":"https://github.com/gpproton/Axolotl","commit_stats":null,"previous_names":["gpproton/axolotl","gpproton/proton.common"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gpproton/Axolotl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpproton%2FAxolotl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpproton%2FAxolotl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpproton%2FAxolotl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpproton%2FAxolotl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpproton","download_url":"https://codeload.github.com/gpproton/Axolotl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpproton%2FAxolotl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016923,"owners_count":26085905,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aspnet-core","blazor","csharp","dotnet","dotnet-core","maui","razor"],"created_at":"2025-02-24T01:32:37.118Z","updated_at":"2025-10-13T20:04:58.608Z","avatar_url":"https://github.com/gpproton.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axolotl\n\nA personal shared library for various types of dotnet project types\n\nNOTE: Issues can be created to improve documentation and fix errors\n\n### Sub-packages\n\n- Axolotl:\n- Axolotl.Http:\n- Axolotl.EFCore:\n- Axolotl.Razor:\n\n\n# Install\n\nThe framework is provided as a set of NuGet packages. In many cases you'll only need the base package, but if you need efcore or razor there are implementation-specific packages available to assist.\n\nTo install the minimum requirements:\n\n```\nInstall-Package Axolotl\n```\n\n## Asp.Net Core Samples\n\n### Added required packages\n\n```powershell\nInstall-Package Axolotl\nInstall-Package Axolotl.EFCore\nInstall-Package Axolotl.AspNet\n```\n\n### Add sample entity\n\n```csharp\npublic sealed class Post : AuditableEntity\u003cGuid\u003e {\n    public string Title { get; set; } = null!;\n    public Category Category { get; set; } = null!;\n    public ICollection\u003cTag\u003e Tags { get; set; } = null!;\n}\n```\n\n### Create your DB context\n\n```csharp\npublic class ServiceContext : DbContext {\n    public ServiceContext(DbContextOptions\u003cServiceContext\u003e options) : base(options) { }\n    protected override void OnModelCreating(ModelBuilder modelBuilder) { }\n    \n    public virtual DbSet\u003cPost\u003e Posts { get; set; } = null!;\n    \n}\n```\n\n### Create your generic repository and apply DbContext\n\n```csharp\npublic class GenericRepository\u003cTEntity, TKey\u003e : GenericBaseRepository\u003cTEntity, ServiceContext, TKey\u003e \n    where TEntity : class, IAggregateRoot, IHasKey\u003cTKey\u003e \n    where TKey : notnull {\n    public GenericRepository(ServiceContext context) : base(context) { }\n}\n```\n\n### Register your DB context \u0026 Unit of work\n\n```csharp\nbuilder.Services.AddDbContext\u003cServiceContext\u003e(options =\u003e options.UseSqlite());\nbuilder.Services.RegisterUnitOfWork\u003cServiceContext\u003e(pooled: false);\n```\n\n### Register generic repository \u0026 service\n\n```csharp\nbuilder.Services.RegisterGenericRepositories(typeof(GenericRepository\u003c,\u003e));\nbuilder.Services.RegisterGenericServices();\n```\n\n### Create optional filter specification\n\n```csharp\npublic sealed class CategorySpec : Specification\u003cPost, Guid\u003e {\n    public CategorySpec(IPageFilter filter) {\n        var search = filter.Search ?? string.Empty;\n        var text = search.ToLower().Split(\" \").ToList().Select(x =\u003e x);\n        Query.Where(x =\u003e  x.Title != String.Empty \u0026\u0026 x.Title.Length \u003e 3 \u0026\u0026 text.Any(p =\u003e EF.Functions.Like(x.Title.ToLower(), $\"%\" + p + \"%\")))\n            .AsNoTracking()\n            .OrderBy(b =\u003e b.Title);\n    }\n}\n```\n\n### Create feature/endpoint\n\n```csharp\npublic class CategoryFeature : GenericFeature\u003cCategoryFeature, Guid\u003e {\n    public override IEndpointRouteBuilder MapEndpoints(IEndpointRouteBuilder endpoints) {\n        var state = new FeatureState(new List\u003cRouteState\u003e {\n            new (RouteType.GetAll, typeof(CategorySpec)),\n            new (RouteType.GetById),\n            new (RouteType.Create)\n        });\n\n        return SetupGroup\u003cCategoryFeature, Category, Guid\u003e(endpoints, state);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpproton%2Faxolotl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpproton%2Faxolotl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpproton%2Faxolotl/lists"}