A simple wallet system
Please write a simple wallet system to implement the following features:
- As a user they can register a new account in the wallet system:
- It’s important for each user to have these details associated to them
- Login Name (must be unique)
- Account Number (must be a unique and random 12 digits number generated upon registration)
- Password
- Balance (value of 0 upon creation)
- Register Date
- As user they can deposit or withdraw form the wallet system
- Just simply update the user balance in the database, don’t need to integrate with the real bank.
- As user they can transfer funds to other existing users
- As user they can view all their transaction history with the following details
- Transaction Type
- Amount
- Account Number (From/To)
- Date Of Transaction
- End Balance
- UI is NOT required.
- It can be a Web Api application or Console application.
- Use DotNet Core
- Use Ado.Net for database access only
- Store data to MSSQL
- Unit testing is required (IMPORTANT), xunit, nunit or msunit, any tools is ok.
- Handle concurrency issues (IMPORTANT)
- DON’T use AspNet Core Identity library.
- Make sure login name is not duplicated in database
- Handle exception is very important, please handle all exceptions properly
- Make sure there is not any loophole
- Use Github to share the source code
- MSSQL
- .NET Core 6
- Need to create schema:
SimpleWallet
, after that need to execute SQL script~/SimpleWallet/InitDatabase.sql
for creating tables. - Need to update your connection string in
appsettings.json
andappsettings.Tests.json
List of endpoints: https://localhost:7168/swagger/
or http://localhost:5168/swagger/
.