Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit a20a415

Browse files
AndriySvyryddavidfowl
authored andcommitted
Remove redundant step to add the UploadConference method (#76)
1 parent 094579b commit a20a415

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

docs/2. Build out BackEnd and Refactor.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -688,24 +688,6 @@ Okay, now we need to update our `ApplicationDbContext` so Entity Framework knows
688688
1. Copy the `DataLoader.cs` class from [here](/src/BackEnd/Data/DataLoader.cs) into the `Data` directory of the `BackEnd` project.
689689
1. Copy the `SessionizeLoader.cs` and `DevIntersectionLoader.cs` classes from [here](/src/BackEnd/Data/) into the current project's `/src/BackEnd/Data/` directory.
690690
> Note: We have data loaders from the two conference series where this workshop has been presented most; you can update this to plug in your own conference file format.
691-
1. Add the following method to the `ConferencesController`:
692-
```csharp
693-
[HttpPost("upload")]
694-
[Consumes("multipart/form-data")]
695-
public async Task<IActionResult> UploadConference([Required, FromForm]string conferenceName, IFormFile file)
696-
{
697-
var loader = new SessionizeLoader();
698-
699-
using (var stream = file.OpenReadStream())
700-
{
701-
await loader.LoadDataAsync(conferenceName, stream, _db);
702-
}
703-
704-
await _db.SaveChangesAsync();
705-
706-
return Ok();
707-
}
708-
```
709691
1. Run the application to see the updated data via Swagger UI.
710692
1. Use the Swagger UI to upload [NDC_London_2019.json](/src/BackEnd/Data/Import/NDC_London_2019.json) to the `/api/Conferences/upload` API.
711693

0 commit comments

Comments
 (0)