This repository contains my version of source code for the book "Ultimate ASP.NET Core Web API"
Huge thanks to the authors!!!
You may buy this book here with all bonus files and full source code.
Or you may try to find it somewhere else:grin:. Even in this repo.
My project structure differs from book because it looked to messy for me. So I've separated solution into solution folders and renamed some assemblies.
It might be better to rename Presentation.Presentation
and other main assemblies in solution folders to something simple like Presentation
. But I'll leave it like this.
I haven't deployed my app to IIS because I've liked the dockerizing way. So I removed the Publish
folder. Docker files won't be provided.
Some of the packages in the book are deprecated as of December 2024. But don't be afraid to use them, there are no major changes compared to previous versions. They are still useful.
Since I didn't have the source code I've struggled sometimes to implement different things. This repository might be useful if you have any issues while reading this book. Code is separated according to chapters.
Provided in book migration process is dependent on Visual Studio tools so it is not portable and might be confusing for users of other IDEs. I've been using Rider during reading so i searched for more universal method. These links helped me a lot:
My settings for data source in Rider:
Instance: MSSQLLocalDB
Auth: No auth
Database: CompanyEmployee
URL: Server=(localdb)\MSSQLLocalDB;Database=CompanyEmployee
All you have to do is to create the Entity class and copy the content from our Entity class that resides in the Entities/Models folder.
The required code for the entity class is not provided in the book. I used the source code from the repository mentioned earlier and it worked nice for me.
I didn't follow the advice:
If for some reason you get the message that you need to review your migration due to possible data loss, you should inspect the migration file
and applied migration for couple of times. Postman requests didn't work as expected. After searching for a while a finally understood the problem and edited the database fields that are responsible for roles ids.