{"id":22320463,"url":"https://github.com/timothyjan/todolist-asp.netcorewebapi-javascript","last_synced_at":"2025-03-26T04:29:42.064Z","repository":{"id":254151245,"uuid":"845642126","full_name":"TimothyJan/TodoList-ASP.NetCoreWebApi-JavaScript","owner":"TimothyJan","description":"Todo List using the ASP.NET Core Web API and JavaScript. Controller-based web API that uses a database. ","archived":false,"fork":false,"pushed_at":"2024-08-21T18:11:13.000Z","size":17666,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T06:08:23.252Z","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-21T16:34:09.000Z","updated_at":"2024-08-21T18:11:16.000Z","dependencies_parsed_at":"2024-08-21T18:58:36.728Z","dependency_job_id":null,"html_url":"https://github.com/TimothyJan/TodoList-ASP.NetCoreWebApi-JavaScript","commit_stats":null,"previous_names":["timothyjan/todolist-asp.netcorewebapi-javascript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoList-ASP.NetCoreWebApi-JavaScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoList-ASP.NetCoreWebApi-JavaScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoList-ASP.NetCoreWebApi-JavaScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FTodoList-ASP.NetCoreWebApi-JavaScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyJan","download_url":"https://codeload.github.com/TimothyJan/TodoList-ASP.NetCoreWebApi-JavaScript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245588913,"owners_count":20640192,"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:46.391Z","updated_at":"2025-03-26T04:29:42.048Z","avatar_url":"https://github.com/TimothyJan.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TodoList-ASP.NetCoreWebApi-JavaScript\nTodo List using the ASP.NET Core Web API and JavaScript. Controller-based web API that uses a database. \n\u003cbr\u003e\n\nASP.NET Core Web API and JavaScript \u003ca href=\"https://learn.microsoft.com/en-us/aspnet/core/tutorials/web-api-javascript?view=aspnetcore-8.0\"\u003elink\u003c/a\u003e\n\u003cbr\u003e\n\nASP.NET Core Web API 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\u003cbr\u003e\n\nDesign\n\u003cimg src=\"./design.jpg\" alt=\"design-screenshot\"\u003e\n\u003cbr\u003e\n\nSwagger Documentation \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\u003cbr\u003e\n\nCheckList:\n\u003cul\u003e\n  \u003cli\u003eCreate Web Project.\u003c/li\u003e\n  \u003cli\u003eAdd a NuGet package to support the database used.\u003c/li\u003e\n  \u003cli\u003eAdd a model class that represent the data that the app manages. .\u003c/li\u003e\n  \u003cli\u003eAdd a database context that coordinates Entity Framework functionality for a data model. .\u003c/li\u003e\n  \u003cli\u003eRegister the database context with the dependency injection (DI) container to provide service to controllers.\u003c/li\u003e\n  \u003cli\u003eScaffold a controller to generate code.\u003c/li\u003e\n  \u003cli\u003eUpdate methods accordingly.\u003c/li\u003e\n  \u003cli\u003ePrevent over-posting to limit the data that's input and returned using a Data Transfer Object(DTO or subset of the model).\u003c/li\u003e\n\u003c/ul\u003e\n\nAPI Notes:\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%2Ftodolist-asp.netcorewebapi-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothyjan%2Ftodolist-asp.netcorewebapi-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothyjan%2Ftodolist-asp.netcorewebapi-javascript/lists"}