-
Notifications
You must be signed in to change notification settings - Fork 2
BarAPI #2
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
hekcalion
wants to merge
25
commits into
AshasTob:main
Choose a base branch
from
hekcalion:main
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
BarAPI #2
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c449650
Create OrderTimeOutService
hekcalion 5e86b12
Add Entities and DbContext
hekcalion 430016c
Add OrderController
hekcalion 6b7f514
Downgrading EntityFramework Core to 3.1 package
hekcalion 178c2a0
Downgrading project to .Net Core 3.1
hekcalion 5c61161
Revert "Downgrading project to .Net Core 3.1"
hekcalion f396842
Revert "Revert "Downgrading project to .Net Core 3.1""
hekcalion 08f5d42
Update BarDataBase.cs
hekcalion fc75e73
Update IMenuRepository.cs
hekcalion 49e8c01
Update MenuRepository.cs
hekcalion 2d627d9
Update MenuController.cs
hekcalion 15b9dd2
Add method GetOrdersByStatus
hekcalion bfc0770
Implement GetOrdersByStatus
hekcalion 15a5844
Update OrderController.cs
hekcalion a4ecb76
Update OrderTimeOut.cs
hekcalion 4297545
Implement method UploadContentBlobAsync
hekcalion 3f018dc
Implement report feature
hekcalion f3fbb58
Create profile.arm.json
hekcalion ec714dd
Update Program.cs
hekcalion 6d86393
Update EnqueueCompleteOrderCommandApp.csproj
hekcalion 9ce03a9
Update .gitignore
hekcalion 65c507e
Revert "Update .gitignore"
hekcalion 6f87b9a
Update BlobStorage.cs
hekcalion cdaa1a6
Update OrderTimeOut.cs
hekcalion 4d98d1c
Update OrderTimeOutService.csproj
hekcalion 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| using Microsoft.AspNetCore.Mvc; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Threading.Tasks; | ||
| using DataAccess.Data; | ||
| using DataAccess.Repository; | ||
|
|
||
| namespace BarAPI.Controllers | ||
| { | ||
| [Route("api/[controller]")] | ||
| [ApiController] | ||
| public class OrderController : Controller | ||
|
AshasTob marked this conversation as resolved.
|
||
| { | ||
| private readonly IOrderRepository _orderRepository; | ||
|
|
||
| public OrderController(IOrderRepository orderRepository) | ||
| { | ||
| _orderRepository = orderRepository; | ||
| } | ||
|
|
||
| // GET: api/<OrderController>/id | ||
| [HttpGet("{id}")] | ||
| [ProducesResponseType(200, Type = typeof(Order))] | ||
| [ProducesResponseType(404)] | ||
| public async Task<IActionResult> Get(int id) | ||
| { | ||
| Order order = await _orderRepository.Get(id); | ||
| if(order == null) | ||
| { | ||
| return NotFound(); | ||
| } | ||
| else | ||
| { | ||
| return Ok(order); | ||
| } | ||
| } | ||
|
|
||
| // POST: api/<OrderController>/ | ||
| [HttpPost] | ||
| [ProducesResponseType(200, Type = typeof(Order))] | ||
| [ProducesResponseType(400)] | ||
| public async Task<IActionResult> Upsert([FromBody] Order item) | ||
| { | ||
| if (!ModelState.IsValid) return BadRequest(ModelState); | ||
| bool isUpsert = await _orderRepository.Upsert(item); | ||
| if (isUpsert) | ||
| { | ||
| return Ok(item); | ||
| } | ||
| else | ||
| { | ||
| return BadRequest(); | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.