Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add controllers for user and role entities #3

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
33d1a1b
Add base setup of dotnet project
osm-Jatin Feb 18, 2025
2389b99
Add document for base setup
osm-Jatin Feb 18, 2025
87828d4
Remove the Api.http file
osm-Jatin Feb 18, 2025
4ef003c
Add editorconfig file
osm-Jatin Feb 18, 2025
cc53232
Add models and DTOs
osm-Jatin Feb 21, 2025
35fa1a1
Add migrations for inital database setup
osm-Jatin Feb 21, 2025
11d4496
Add user repo and service layers
osm-Jatin Feb 21, 2025
6983f3a
Add role repo and service layers
osm-Jatin Feb 21, 2025
f16118c
Update the IRoleService
osm-Jatin Feb 27, 2025
3dbce76
Update the migration scripts
osm-Jatin Feb 27, 2025
4d7810d
Update the model classes
osm-Jatin Feb 27, 2025
d1f3f59
Updated RoleDTOs to use inheritance
osm-Jatin Mar 1, 2025
8c20210
Updated the class name
osm-Jatin Mar 1, 2025
70ef75f
Validate the connection string
osm-Jatin Mar 1, 2025
5686323
Make the RoleBaseDto class abstract
osm-Jatin Mar 1, 2025
0f931d2
Add User DTOs
osm-Jatin Feb 22, 2025
7ed3790
Add role controller
osm-Jatin Feb 22, 2025
4bfd11c
Update the service and repo layers in respect to DTOs
osm-Jatin Feb 22, 2025
288deb6
Add User controller
osm-Jatin Feb 22, 2025
28a8c41
Add Bcrypt package
osm-Jatin Feb 22, 2025
c2fe9c7
Remove the default values
osm-Jatin Feb 27, 2025
ab2edd1
Reverse the null-check logic for role creation
osm-Jatin Mar 1, 2025
bb9f73c
Reverse the logic to allow valid name updates
osm-Jatin Mar 1, 2025
52e89cb
Add data validations to UserDTOs
osm-Jatin Mar 1, 2025
090720f
Add MaxLength constraint to PasswordHash for security
osm-Jatin Mar 1, 2025
2df2430
Add validation for duplicate role names
osm-Jatin Mar 1, 2025
8da9b25
Add validation for unique email
osm-Jatin Mar 1, 2025
f7b922f
Avoid redundant JSON serializer options
osm-Jatin Mar 1, 2025
27b3267
Allow updating user with the same email
osm-Jatin Mar 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions base_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Base Setup for .NET Foundation Repository

This document provides step-by-step instructions to set up the base structure for your .NET projects, including an API project and a Core library.

## Prerequisites
Ensure you have the following installed:
- [.NET SDK 8.0.11](https://dotnet.microsoft.com/en-us/download)
- Git
- A terminal (Command Prompt, PowerShell, or Linux/macOS shell)

## 1. Initialize the Root Directory
```sh
mkdir DotNetFoundationV2 && cd DotNetFoundationV2
```

## 2. Create the `src` Directory
```sh
mkdir src && cd src
```

## 3. Create the API Project
```sh
dotnet new webapi -o Api
```
This will create an ASP.NET Core Web API inside `src/Api`.

## 4. Create the Core Library
```sh
dotnet new classlib -o Core
```
This will create a .NET Class Library inside `src/Core`.

## 5. Add `Core` as a Reference to `Api`
```sh
cd Api
dotnet add reference ../Core/Core.csproj
cd ..
```

## 6. Create a Solution File and Add Projects
```sh
dotnet new sln -n DotNetFoundation
```
Add projects to the solution:
```sh
dotnet sln DotNetFoundation.sln add Api/Api.csproj
```
```sh
dotnet sln DotNetFoundation.sln add Core/Core.csproj
```

## 7. Verify the Directory Structure
Run the following command:
```sh
tree
```
Expected output:
```
src/
├── Api/
│ ├── Api.csproj
│ ├── Program.cs
│ └── ...
└── Core/
├── Core.csproj
└── ...
```


This setup provides a structured foundation for your .NET projects. 🚀

Loading