/bug-free-octo-waddle

[Les Jackson] .NET Core 3.1 MVC REST API - Full Course

Primary LanguageC#

bug-free-octo-waddle

[Les Jackson] .NET Core 3.1 MVC REST API - Full Course

Grab the article at https://www.youtube.com/watch?v=fmvcAzHpsk8

Tips/Run

  • Run "dotnet run" to run the API for practical use for production or for testing within Postman;
  • When creating a new SQL user, be sure to set the SQL Server properties to "SQL Server and Windows Authentication mode" (under the Security tab), and reset the "sqlservr.exe" (SQL Server (MSSQLSERVER)) service;
  • No seeding of data was performed early on here in the tutorial, so manually inserting the data was chosen:
begin transaction
	insert into Commands(HowTo, Line, Platform)
	values('How to create migrations', 'dotnet ef migrations add <Name of Migration>', 'EF Core');

	insert into Commands(HowTo, Line, Platform)
	values('How to run migrations', 'dotnet ef database update', 'EF Core');
--commit transaction
rollback transaction

Errors Experienced

  • Abc;

Notes:

  • Run "ctor" in a class and hit tab twice to build a constructor within a class;
  • Run "prop" in a class and hit tab twice to build a property within a class;
  • Run "dotnet ef migrations add InitialMigration" to add a migration;
  • Run "dotnet ef migrations remove" to remove a migration;
  • Run "dotnet ef database update" to create the database based on the migration;
  • User secrets have not been added so connection is in plain sight, credentials are mock and are not used anywhere on the internet; this is for tutorial purposes only;

What's it all about?

  • In this full course, we show you how to build a full REST API using .NET Core 3.1. We’ll employ MVC, REST, the Repository Pattern, Dependency Injection, Entity Framework, Data Transfer Objects, (DTOs), AutoMapper to provide 6 API endpoints that will allow you to Create, Read Update and Delete resources;

Thanks

Thanks goes out to Les Jackson for the FREE stuff!