This is tiny application, at the time start the application I crawed restaurant data from this page. Then I parsed & saved data to sql server db. Then I create front-end application(reactjs application) to consume the api with data above. I used IdentityServer4 to handle authenication for the APIs.
- AspnetCore 2.0.
- EntityFramework Core 2.1 & Code first.
- IdentityServer4.
- RESTful APIs - RestaurantsController.cs.
- AutoMapper.
- Htmlagilitypack to craw RestaurantCrawler.cs.
- Generic repository in c#.
-
Change connectstring at App.Api/appsettings.json
-
Make sure dotnet core SDK 2.0 is installed
-
At the server folder run the following command to install dependencies:
dotnet restore
-
At the root project server folder cd to App.Api project:
cd App.Api
-
At the command line run the following statements to initialize database:
dotnet ef database update --startup-project ../App.Api -c PersistedGrantDbContext dotnet ef database update --startup-project ../App.Api -c ConfigurationDbContext dotnet ef database update --startup-project ../App.Api -c AppDbContext
-
Run the application:
dotnet run
- Reactjs.
- Redux.
- Es6.
- Semantic.
- Make sure nodejs & yarn are installed.
- At the root folder of the client project run the following command to install dependencies:
yarn install
- Start the front-end application:
yarn start
Final result, we consume the api restaurant to display restaurant in the grid view.