Giter Site home page Giter Site logo

testtask.usermanagement's Introduction

ASP.NET Core Web API Test Assignment

Welcome to the ASP.NET Core Web API test assignment. This task involves developing a Web API that supports CRUD operations for managing a user list.

Requirements

  1. Data Model:

    • Define a User model with the following attributes:
      • Id
      • Name
      • Age
      • Email
      • Associated entity Role with possible values of User, Admin, Support, and SuperAdmin
      • A User can have multiple roles.
  2. Features

    • Implement a UsersController with methods to perform the following operations:
      • Retrieve a list of all users with pagination, sorting, and filtering based on each attribute in the User model.
      • Retrieve a user by Id along with all their roles.
      • Add a new role to a user.
      • Create a new user.
      • Update user information by Id.
      • Delete a user by Id.
  3. Rules:

    • Add data validation logic:
      • Ensure required fields (Name, Age, Email) are present.
      • Verify the uniqueness of Email.
      • Check that Age is a positive number.
      • Add authentication and authorization to your API using JWT tokens.
  4. Data Access:

    • Use Entity Framework Core (or another ORM of your choice) for data access and to store users and roles in a database.
    • Create a migration to generate the necessary database tables.

Additional Tasks (Optional)

  • Configure logging for API actions (e.g., using Serilog).
  • Docker support.

testtask.usermanagement's People

Contributors

vazovsk1y avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.