Skip to content

Implement Profile Table and Endpoints for Users in ASP.Net Web API Project #17

Description

@johnsmith0305

Objective:

To enhance the user management system by implementing a profile table and relevant endpoints in the ASP.Net Web API project. This enhancement will allow users to store additional information beyond the basic user details provided by the IdentityUser.

Details:

Profile Table:

  • Create a new table named "UserProfile" or similar to store additional user information.
  • Define the necessary fields such as UserId (foreign key referencing IdentityUser), FirstName, LastName, Email, PhoneNumber, etc.
  • Implement proper relationships between the IdentityUser and UserProfile tables.

Endpoints:

  1. Create Profile:
  • Endpoint: '/api/Profile'
  • Method: POST
  • Description: Allows users to create their profile by providing necessary details like first name, last name, email, phone number, etc.
  1. Get Profile by User ID:
  • Endpoint: '/api/Profile/{userId}'
  • Method: GET
  • Description: Fetches the profile information for a specific user based on their ID.
  1. Update Profile
  • Endpoint: '/api/Profile/{uesrId}'
  • Method: PUT
  • Description: Allows users to update their profile information with new details.
  1. Delete Profile
  • Endpoint: /api/Profile/{id}'
  • Method: DELETE
  • Description: Allows user to delete their profile permanently.

Additional Considerations:

  • Ensure proper validation for data input.
  • Implement authentication and authorization mechanisms for profile-related endpoints.
  • Document API endpoints using Swagger or similar tools for ease of understanding and usage. (automatic)
  • Write unit tests to ensure the functionality and security of profile-related operations. (optional)

Implementation Plan:

  1. Define the structure of the UserProfile table and its relationship with IdentityUser.
  2. Implement CRUD operations for profile management.
  3. Integrate authentication and authorization mechanisms for profile endpoints.
  4. Write unit tests to validate the functionality. (optional)
  5. Document API endpoints using Swagger. (automatic)

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions