{"id":22320447,"url":"https://github.com/timothyjan/todoapi-asp.netcorewebapi","last_synced_at":"2025-03-26T04:29:41.060Z","repository":{"id":253864162,"uuid":"844760923","full_name":"TimothyJan/TodoApi-ASP.NetCoreWebAPI","owner":"TimothyJan","description":"TodoApi using the ASP.NET Core Web API.","archived":false,"fork":false,"pushed_at":"2024-08-20T18:38:44.000Z","size":17646,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T06:08:21.486Z","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/TimothyJan.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,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T23:16:06.000Z","updated_at":"2024-08-20T18:38:47.000Z","dependencies_parsed_at":"2024-08-20T03:45:00.452Z","dependency_job_id":null,"html_url":"https://github.com/TimothyJan/TodoApi-ASP.NetCoreWebAPI","commit_stats":null,"previous_names":["timothyjan/todoapi-asp.netcorewebapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoApi-ASP.NetCoreWebAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoApi-ASP.NetCoreWebAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoApi-ASP.NetCoreWebAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoApi-ASP.NetCoreWebAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyJan","download_url":"https://codeload.github.com/TimothyJan/TodoApi-ASP.NetCoreWebAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245588895,"owners_count":20640187,"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-12-04T00:13:44.272Z","updated_at":"2025-03-26T04:29:41.036Z","avatar_url":"https://github.com/TimothyJan.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TodoApi-ASP.NetCoreWebAPI\nTodoApi using the ASP.NET Core Web API. Controller-based web API that uses a database. Tutorial \u003ca href=\"https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-8.0\u0026tabs=visual-studio\"\u003elink\u003c/a\u003e\n\n\u003cbr\u003e\n\nDesign\n\u003cimg src=\"./design.jpg\" alt=\"design-screenshot\"\u003e\n\n\u003cbr\u003e\n\nSwagger Documentation \u003cbr\u003e\n\u003ca href=\"https://learn.microsoft.com/en-us/aspnet/core/tutorials/web-api-help-pages-using-swagger?view=aspnetcore-8.0\"\u003elink\u003c/a\u003e\n\n\nNotes:\n\u003cul\u003e\n  \u003cli\u003eA model is a set of classes that represent the data that the app manages. The model for this app is the TodoItem class.\u003c/li\u003e\n  \u003cli\u003eThe database context is the main class that coordinates Entity Framework functionality for a data model. In ASP.NET Core, services such as the DB context must be registered with the dependency injection (DI) container. The container provides the service to controllers.\u003c/li\u003e\n  \u003cli\u003eAdd new Scaffolded Item in the Controllers folder to generate code.\u003c/li\u003e\n  \u003cli\u003eThe return type of \u003ccode\u003eActionResult\u0026lt;T\u003e\u003c/code\u003e type. ASP.NET Core automatically serializes the object to JSON and writes the JSON into the body of the response message.\u003c/li\u003e\n\u003c/ul\u003e\n\nPrevent over-posting:\n\u003cul\u003e\n  \u003cli\u003eProduction apps typically limit the data that's input and returned using a subset of the model. \u003c/li\u003e\n  \u003cli\u003eThere are multiple reasons behind this, and security is a major one.\u003c/li\u003e\n  \u003cli\u003eThe subset of a model is usually referred to as a Data Transfer Object (DTO), input model, or view model.\u003c/li\u003e\n  \u003cli\u003eA DTO may be used to:\n    \u003cul\u003e\n      \u003cli\u003ePrevent over-posting.\u003c/li\u003e\n      \u003cli\u003eHide properties that clients are not supposed to view.\u003c/li\u003e\n      \u003cli\u003eOmit some properties in order to reduce payload size.\u003c/li\u003e\n      \u003cli\u003eFlatten object graphs that contain nested objects. Flattened object graphs can be more convenient for clients.\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothyjan%2Ftodoapi-asp.netcorewebapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothyjan%2Ftodoapi-asp.netcorewebapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothyjan%2Ftodoapi-asp.netcorewebapi/lists"}