Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit f169d44

Browse files
committed
README
1 parent 3b790c0 commit f169d44

File tree

3 files changed

+245
-0
lines changed

3 files changed

+245
-0
lines changed

README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# WebAPI-MVC
2+
3+
### KeyWords
4+
5+
1. ContactUs
6+
- Date
7+
- Name
8+
- Email
9+
- Message
10+
11+
2. Order
12+
- MemberId
13+
- ProductName
14+
- RequiredDate
15+
- Quantities
16+
17+
3. SERVER_NAME
18+
19+
4. DATABASE_NAME
20+
21+
5. Template
22+
23+
24+
### Structure
25+
26+
```
27+
backend
28+
Controllers
29+
ContactUs
30+
Order
31+
Users
32+
Administration
33+
Authentication
34+
Entities
35+
DataBaseContext
36+
Models
37+
ContactUs
38+
Order
39+
Users
40+
Roles
41+
Users
42+
Properties
43+
HTTP
44+
SQL
45+
46+
frontend
47+
Controllers
48+
ContactUs
49+
Miscellaneous
50+
Error
51+
Home
52+
Messages
53+
Order
54+
Users
55+
NewUser
56+
Users
57+
Models
58+
ContactUs
59+
Order
60+
Users
61+
JWT
62+
Users
63+
Views
64+
ContactUs
65+
ContactUs
66+
Index
67+
Error
68+
Error401
69+
Error404
70+
Load1
71+
Load2
72+
Load3
73+
Load4
74+
NotLoggedIn
75+
Unexpected
76+
Messages
77+
Create
78+
Delete
79+
Edit
80+
Order
81+
NewUser
82+
Create
83+
Delete
84+
DeleteByMail
85+
Edit
86+
EditByMail
87+
Users
88+
Order
89+
Index
90+
MyOrder
91+
Order
92+
Shared
93+
_Layout
94+
Error401
95+
Error404
96+
User
97+
ControlPannel
98+
HomePage
99+
Login
100+
MyAccount
101+
```

backend/README.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# backend
2+
3+
### Prerequisites
4+
5+
1. [.NET 5.0](https://dotnet.microsoft.com/en-us/download/dotnet/5.0#:~:text=May%2010%2C%202022-,Build%20apps%20%2D%20SDK,-Tooltip%3A%20Do%20you)
6+
7+
2. [SQL-Server](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16#:~:text=Free%20Download%20for%20SQL%20Server%20Management%20Studio%20(SSMS)%2018.12.1)
8+
9+
3. [SSMS](https://www.microsoft.com/en-in/sql-server/sql-server-downloads#:~:text=Download%20now-,Express,-SQL%20Server%202019)
10+
11+
### To Start
12+
13+
1. make changes in *DefaultConnection* of `appsettings.json`
14+
```json
15+
"ConnectionStrings": {
16+
"DefaultConnection": "server=SERVER_NAME;database=DATABASE_NAME;trusted_connection=true;"
17+
},
18+
```
19+
20+
2. For Database connection
21+
22+
```powershell
23+
dotnet build
24+
```
25+
26+
```powershell
27+
dotnet ef migrations add InitialCreate --context DataBaseContext --output-dir Migrations
28+
```
29+
30+
```powershell
31+
dotnet ef database update
32+
```
33+
34+
For `AuthenticationException` use these commands
35+
```powershell
36+
dotnet dev-certs https --clean
37+
dotnet dev-certs https --trust
38+
```
39+
40+
```powershell
41+
dotnet run
42+
```
43+
44+
3. Use `postman` or `thunderclient` further
45+
46+
1. **POST** method
47+
48+
```
49+
https://localhost:5001/api/authenticate
50+
```
51+
52+
There in *basic auth* use these credentials
53+
54+
```http
55+
UserName: admin@localhost
56+
Password: Passcode1
57+
```
58+
59+
##### `Token` would be generated
60+
61+
<details>
62+
<summary>Screenshots</summary>
63+
<img src="https://user-images.githubusercontent.com/76637730/185432139-1499ed0d-742e-49b5-871c-08b974b9127e.png"> <br>
64+
Response <br>
65+
<img src="https://user-images.githubusercontent.com/76637730/185439279-51db7471-c966-4dcb-bfb0-5f64e4cb1eac.png">
66+
</details>
67+
68+
### thunderclient Log
69+
70+
#### 1. `POST` login
71+
```
72+
https://localhost:5001/api/authenticate
73+
```
74+
75+
#### 2. `GET` all_users
76+
```
77+
https://localhost:5001/api/authenticate
78+
```
79+
80+
#### 3. `GET` first_user
81+
```
82+
https://localhost:5001/api/administration/1
83+
```
84+
85+
#### 4. `POST` create_user
86+
```
87+
https://localhost:5001/api/authenticate
88+
```
89+
90+
#### 5. `DELETE` first_user
91+
```
92+
https://localhost:5001/api/authenticate/1
93+
```
94+
95+
---
96+
97+
#### 1. `GET` all_orders_by_order
98+
```
99+
https://localhost:5001/api/order/order
100+
```
101+
102+
#### 2. `GET` all_orders_by_drug
103+
```
104+
https://localhost:5001/api/order/drug
105+
```
106+
107+
#### 1. `POST` order
108+
```
109+
https://localhost:5001/api/products/1
110+
```
111+
```http
112+
{
113+
"MemberId":"2434",
114+
"ProductName": "ICICI",
115+
"RequiredDate": "1999-11-18T06:30:00",
116+
"Quantities": 2,
117+
"UserId":"1",
118+
}
119+
```
120+
121+
---
122+
123+
#### 1. `GET` all_messages
124+
```
125+
https://localhost:5001/api/ContactUs/
126+
```
127+
128+
#### 1. `GET` first_messages
129+
```
130+
https://localhost:5001/api/ContactUs/1
131+
```

frontend/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# frontend
2+
3+
### Run it using either of the command
4+
5+
```
6+
dotnet run
7+
```
8+
9+
```
10+
dotnet watch run
11+
```
12+
13+
### And open the [site](https://localhost:5002/)

0 commit comments

Comments
 (0)