{"id":26159722,"url":"https://github.com/yauhenbichel/customers-web-api","last_synced_at":"2026-04-11T13:34:21.289Z","repository":{"id":203528359,"uuid":"709758497","full_name":"YauhenBichel/Customers-Web-API","owner":"YauhenBichel","description":"Simple Web API for customers management with Patch and Dockerfile using .NET Core","archived":false,"fork":false,"pushed_at":"2023-10-30T09:56:09.000Z","size":2124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T22:55:31.277Z","etag":null,"topics":["c-sh","docker","dotnet-core","patch","rest-api"],"latest_commit_sha":null,"homepage":"","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/YauhenBichel.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":"2023-10-25T10:44:24.000Z","updated_at":"2023-12-15T13:10:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd2a48f5-a512-4281-9d69-feac85a79eab","html_url":"https://github.com/YauhenBichel/Customers-Web-API","commit_stats":null,"previous_names":["yauhenbichel/customers-web-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YauhenBichel/Customers-Web-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YauhenBichel%2FCustomers-Web-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YauhenBichel%2FCustomers-Web-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YauhenBichel%2FCustomers-Web-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YauhenBichel%2FCustomers-Web-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YauhenBichel","download_url":"https://codeload.github.com/YauhenBichel/Customers-Web-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YauhenBichel%2FCustomers-Web-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31682953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c-sh","docker","dotnet-core","patch","rest-api"],"created_at":"2025-03-11T11:34:46.994Z","updated_at":"2026-04-11T13:34:21.265Z","avatar_url":"https://github.com/YauhenBichel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customers-Web-API\nSimple Web API for customers management using .NET Core\n\n## Description\nA Web API to support the management of Customers.\n\n## How to run\n    Note: the default port is 5033\n\n    \u003ecd CustomerManagement\n    \u003edotnet run\n    \u003eimport postman collection \"CustomersManagement.postman_collection.json\"\n#### If port is used\n    \u003esudo lsof -i -P | grep LISTEN | grep :5033\n    \u003esudo kill -9 \u003cPID\u003e\n\n### With dockerfile\n    \u003ecd CustomerManagement\n    \u003edocker build . -t ybichel/customerapi\n    \u003edocker run ybichel/customerapi\n\n\n## Entities\n- Customer\n    - title NOT NULL max varchar 20\n    - forename NOT NULL max varchar 50\n    - surname NOT NULL max varchar 50\n    - emailAddress NOT NULL max varchar 75\n    - mobileNo NOT NULL max varchar 15\n- Address\n    - addressLine1 NOT NULL max varchar 80\n    - addressLine2 NULL max varchar 80\n    - town NOT NULL max varchar 50\n    - country NULL max varchar 50 //If not provided default to UK\n    - postcode NOT NULL max varchar 10\n\n## Constraints\n• Cannot delete the last address as a customer MUST have at least one address.\n• A secondary address can become the main address, but a customer can have ONLY ONE main address.\n• A customer can only exist once within the database\n• A customer can have multiple addresses.\n\n## API Functionality\n• A customer can be marked as in-active if requested by the customer.\n• A customer can be deleted, and all associated addresses should also be deleted\n• A list of ALL customers can be returned.\n• A list of INACTIVE customers can be returned.\n\n## API\n### Please use a postman collection\n\n- Create a customer\n- GET all customers\n- GET all active customers\n- DELETE a customer and all associated addresses\n- PATCH a customer as in-active\n    request body\n    ```\n    [     \n        {       \n           \"op\": \"replace\",       \n           \"path\": \"/InActive\",       \n           \"value\": true\n        }\n    ]\n    ```\n- PATCH an address as main\n    request body\n    ```\n    [     \n        {       \n           \"op\": \"replace\",       \n           \"path\": \"/IsMain\",       \n           \"value\": true\n        } \n    ]\n    ```\n\n## Database\n- I use in-memory database\n    - Constraints are not supported by database in-memory\n    https://learn.microsoft.com/en-us/ef/core/testing/#inmemory-is-not-a-relational-database \n\n\n## Postman collection\n- pre-request script generates random string values\n\n## References\n- https://code.visualstudio.com/docs/containers/quickstart-aspnet-core ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyauhenbichel%2Fcustomers-web-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyauhenbichel%2Fcustomers-web-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyauhenbichel%2Fcustomers-web-api/lists"}