-
Notifications
You must be signed in to change notification settings - Fork 125
Home work2 controllers #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KennyDeew
wants to merge
8
commits into
OTUS-NET:main
Choose a base branch
from
KennyDeew:HomeWork2_Controllers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5fb2719
ADD GET http request
af4d2b0
Добавил метод Create в EmployeesController
36d1b59
add POST http request
ae06c30
fixed LastName in CreateEmployeeRequest
a541ef1
added Update method in EmployeesController
c51ea81
added PUT http request
d534792
added Delete method in EmployeesController
c463123
added DELETE http request
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| { | ||
| "Version": 1, | ||
| "WorkspaceRootPath": "C:\\Users\\\u041C\u0430\u0448\u0438\u043D\u0430\\Desktop\\OTUS_2025\\HomeWorks\\HW2\\ASP.NET\\", | ||
| "Documents": [], | ||
| "DocumentGroupContainers": [ | ||
| { | ||
| "Orientation": 0, | ||
| "VerticalTabListWidth": 256, | ||
| "DocumentGroups": [ | ||
| { | ||
| "DockedWidth": 200, | ||
| "SelectedChildIndex": -1, | ||
| "Children": [ | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:132:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:133:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:133:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:134:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:135:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:139:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:138:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:141:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:143:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:140:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:142:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:147:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:149:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:148:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:151:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:152:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:153:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:154:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:155:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:157:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:158:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:159:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:160:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:161:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:162:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:163:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:156:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| }, | ||
| { | ||
| "$type": "Bookmark", | ||
| "Name": "ST:130:0:{1fc202d4-d401-403c-9834-5b218574bb67}" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Homeworks/Base/src/PromoCodeFactory.WebHost/Request/CreateEmployeeRequest.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| namespace PromoCodeFactory.WebHost.Request | ||
| { | ||
| public class CreateEmployeeRequest | ||
| { | ||
| public string FirstName { get; set; } | ||
|
|
||
| public string LastName { get; set; } | ||
|
|
||
| public string Email { get; set; } | ||
|
|
||
| public int AppliedPromocodesCount { get; set; } | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
Homeworks/Base/src/PromoCodeFactory.WebHost/Request/UpdateEmployeeRequest.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| namespace PromoCodeFactory.WebHost.Request | ||
| { | ||
| public class UpdateEmployeeRequest | ||
| { | ||
| public string FirstName { get; set; } | ||
|
|
||
| public string LastName { get; set; } | ||
|
|
||
| public string Email { get; set; } | ||
|
|
||
| public int AppliedPromocodesCount { get; set; } | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
Homeworks/Base/src/PromoCodeFactory.WebHost/wwwroot/Test_HTTP.http
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| @baseURL = https://localhost:5001 | ||
|
|
||
| ### | ||
| GET {{baseURL}}/api/v1/Employees | ||
|
|
||
| ### | ||
| POST {{baseURL}}/api/v1/Employees | ||
| Content-Type: application/json | ||
|
|
||
| { | ||
| "firstName": "Ivan", | ||
| "lastName": "Petrov", | ||
| "email": "[email protected]", | ||
| "appliedPromocodesCount": 0 | ||
| } | ||
|
|
||
| ### | ||
| PUT {{baseURL}}/api/v1/Employees/f766e2bf-340a-46ea-bff3-f1700b435895 | ||
| Content-Type: application/json | ||
|
|
||
| { | ||
| "firstName": "����", | ||
| "lastName": "�������", | ||
| "email": "[email protected]", | ||
| "appliedPromocodesCount": 5 | ||
| } | ||
|
|
||
| ### | ||
| DELETE {{baseURL}}/api/v1/Employees/f766e2bf-340a-46ea-bff3-f1700b435895 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.vs папку не нужно пушить в репозиторий