This project is meant to emulate the Api for https://randomuser.me/.
Created by Josh Asi
- Visual Studio
- .NET Core 3.1.x
- C#
- .NET Core
- Entity Framework Core
- Sqlite
git clone https://github.com/josh-asi/random-user.git
Open Visual Studio and run the project RandomUser.WebApi. Swagger will open by default.
I have tried to implement the Ports and Adapter Pattern/Hexagonal Architecture. I also try to closely follow Domain Driven Design and have implemented as to how I understand it.
- ID: The identifier which would link to a specific user
- Email: The user's e-mail address
- Name: The name of a user which includes title, first and last name
- Date of Birth: The year the person was born
- Phone Number: A seven digit number representing the phone number of a user
- Profile Images: A link to the profile image
- GetUsers
- GetUser
- UpdateUser
- DeleteUser
Returns all the users. Filters can be applied such a number limit or by name.
Limit: GET /api/users/{limit}
First Name: GET /api/users/first-name/{name}
Last Name: GET /api/users/last-name/{name}
Returns a user based on the id.
GET /api/user/{userId}
Updates the name of a user based on the request body.
POST /api/user/name
Deletes the user from the database based on the id.
DELETE /api/user/{userId}
- Currently, only names can be updated
- When updating a name, a User object is returned. The e-mail and phone number will not have any values as they are private properties
- Data seeding has not been tested
- No tests for the WebAPI project yet
This project is licensed under the ISC license, Copyright (c) 2020 Josh Asi. For more information see LICENSE.md.