Summary: ContactBook allows users to manage their own contact book! Create, edit, and delete contacts into your contact book. Fill in names, email, phone number and info and build your very own contact list!
- Target platform: .NET 6
- Seeded database with one user and three contacts
- Default user credentials:
guest@mail.com
/guest
The ASP.NET Core app "ContactBook" is an app for creating contacts.
- Technologies: C#, ASP.NET Core, Entity Framework Core, ASP.NET Core Identity, NUnit
- The app supports the following operations:
- Home page (view contacts count + menu):
/
- View contacts:
/Contacts/All
- Create a new contact (name + email + phone number + comments):
/Contacts/Create
- Edit contact:
/Contacts/Edit/:id
- Delete contact:
/Contacts/Delete/:id
- Home page (view contacts count + menu):
The following endpoints are supported:
GET /api
- list all API endpointsGET /api/contacts
- list all contactsGET /api/contacts/count
- returns contacts countGET /api/contacts/:id
- returns a contact by givenid
GET /api/contacts/search/:keyword
- returns contacts by givenkeyword
POST /api/contacts/create
- create a new (send a JSON object in the request body, e.g. `{ "first name": "Johnny", "last name": "Depp", "email": "j.depp@mail.com", "phone number": "+12298015369", "comments": "An American actor, producer, and musician. Best in 'Pirates of the Caribbean'" })PUT /api/contacts/:id
- edit contact byid
(send a JSON object in the request body, holding all fields, e.g.{ "first name": "Johnny", "last name": "Depp", "email": "j.depp@mail.com", "phone number": "+12298015369", "comments": "An American actor, producer, and musician. Best in 'Pirates of the Caribbean'" }
)PATCH /api/contacts/:id
- partially edit contact byid
(send a JSON object in the request body, holding the fields to modify, e.g.{ "email": "johnny.depp@mail.com", "phone number": "+12298015369" }
)DELETE /api/contacts/:id
- delete contact byid
GET /api/users
- list all usersPOST /api/users/login
- logs in an existing user (send a JSON object in the request body, holding all fields, e.g.{"email": "guest@mail.com", "password": "guest"}
)POST /api/users/register
- registers a new user (send a JSON object in the request body, holding all fields, e.g.{ "email": "someUsername@mail.bg", "firstName": "someName", "lastName": "someLastName", "phoneNumber": "+192088877744", "password": "somePassword", "confirmPassword": "somePassword" }
)