{"id":16678960,"url":"https://github.com/joncloud/apogee-net","last_synced_at":"2026-04-27T09:02:21.144Z","repository":{"id":78825122,"uuid":"113371467","full_name":"joncloud/apogee-net","owner":"joncloud","description":"Allows activity to be batched together in the background","archived":false,"fork":false,"pushed_at":"2020-06-13T21:56:08.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"publish","last_synced_at":"2025-03-06T04:36:32.151Z","etag":null,"topics":["activity","asp-net-core","asp-net-core-mvc","background","batch","batching","group","mvc"],"latest_commit_sha":null,"homepage":null,"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/joncloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-12-06T21:57:51.000Z","updated_at":"2019-02-04T14:09:04.000Z","dependencies_parsed_at":"2023-06-09T00:45:26.674Z","dependency_job_id":null,"html_url":"https://github.com/joncloud/apogee-net","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncloud%2Fapogee-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncloud%2Fapogee-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncloud%2Fapogee-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joncloud%2Fapogee-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joncloud","download_url":"https://codeload.github.com/joncloud/apogee-net/tar.gz/refs/heads/publish","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243360796,"owners_count":20278438,"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":["activity","asp-net-core","asp-net-core-mvc","background","batch","batching","group","mvc"],"created_at":"2024-10-12T13:32:25.397Z","updated_at":"2025-12-26T09:31:36.235Z","avatar_url":"https://github.com/joncloud.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apogee.NET\n[![Travis](https://img.shields.io/travis/joncloud/apogee-net.svg)](https://travis-ci.org/joncloud/apogee-net/)\n[![NuGet](https://img.shields.io/nuget/v/Apogee.svg)](https://www.nuget.org/packages/Apogee/)\n\n## Description\nApogee.NET allows activity to be batched together in the background.\n\n## Licensing\nReleased under the MIT License.  See the [LICENSE][] file for further details.\n\n[license]: LICENSE.md\n\n## Installation\nIn the Package Manager Console execute\n\n```powershell\nInstall-Package Apogee\n```\n\nOr update `*.csproj` to include a dependency on\n\n```xml\n\u003cItemGroup\u003e\n  \u003cPackageReference Include=\"Apogee\" Version=\"0.1.0-*\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n## Usage\n\nUse the `AddApogee` configuration method to define all batch processors. Follow up with the `UseApogee` method to ensure that the system is started when the application starts.\n\nSee the following example for tracking visitors to the web site. It takes any activity that occurs, and defers it to the background in a batch to prevent the activity from taking valuable time from the intent of the user.\n\n```csharp\npublic void ConfigureServices(IServiceCollection services) =\u003e \n  services.AddApogee(options =\u003e options.AddProcessorScoped\u003cVisitor, VisitorProcessor\u003e());\n  \npublic void Configure(IApplicationBuilder app, IHostingEnvironment env) =\u003e\n  app.UseApogee().UseMvc();\n  \nclass VisitorProcessor : IBatchProcessor\u003cVisitor\u003e {\n  readonly VisitorContext _context;\n  public VisitorProcessor(VisitorContext context) =\u003e\n    _context = context;\n\n  public void Process(Batch\u003cVisitor\u003e batch) {\n    _context.Visitors.AddRange(batch.Items);\n    _context.SaveChanges();\n  }\n}\n\nclass VisitorMiddleware {\n  readonly RequestDelegate _next;\n  readonly IBatchService\u003cVisitor\u003e _batchService;\n  public VisitorMiddleware(RequestDelegate next, IBatchService\u003cVisitor\u003e batchService) {\n    _next = next;\n    _batchService = batchService;\n  }\n  \n  public Task InvokeAsync(HttpContext context) {\n    var visitor = new Visitor(context);\n    _batchService.Add(visitor);\n    return _next(context);\n  }\n}\n```\n\nFor additional usage see [Tests][].\n\n[Tests]: tests/Apogee.Tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoncloud%2Fapogee-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoncloud%2Fapogee-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoncloud%2Fapogee-net/lists"}