
https://github.com/gavilanch/MoviesAPI
Explore how web APIs expose defined interfaces that let external applications consume a web application and enable cross-application communication via rest style APIs.
Explore representational state transfer and the six REST conditions that shape restful web APIs, including client-server architecture, uniform interface, URIs, HTTP methods, and HATEOAS.
Explore how http methods map actions to resources in restful web APIs, using get, post, put, delete, and patch with headers, bodies, and server responses.
Explain how RESTful APIs enable components to communicate through standard constraints, using requests with headers and bodies and HTTP methods to act on resources with status codes.
Discover the development stack and set up the environment for building restful web APIs with ASP.NET Core 3.1, using Visual Studio or a pseudocode workflow, and test with Postman.
https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
Install Visual Studio Code and .NET Core, create a web API project, run it on localhost, and resolve HTTPS certificates to test your ASP.NET Core 3.1 RESTful API.
Install Postman from postman.com and use the API client to test your ASP.NET Core web API, sending a get request and viewing a formatted response with date, temperature, and summary.
Explore the basics of an ASP.NET Core web API, covering controllers, actions, endpoints, and routing rules, then implement asynchronous programming, model binding, validation, dependency injection, loggers, and middleware.
Define a genre entity and an in-memory repository to model and expose data, then implement a repository interface, configure dependency injection, and prepare a controller to access data.
Learn how asynchronous actions work in ASP.NET Core, with a pizza analogy, implement async repository and controller patterns to improve scalability, and avoid mixing sync and async.
Model binding maps data from HTTP requests to action parameters, handling route, query, form, and body sources for simple and complex types, with binding attributes and model state validation.
Explore validating models in ASP.NET Core using data annotations such as required, extreme length, range, credit card, compare, and regular expression; enable automatic model state validation via API controller.
Implement custom validations in asp.net core using attribute-based and model-level approaches; enforce rules like first letter uppercase, access the full model via validation context, and compare reuse and scope.
Inject ILogger<T> into controllers to log information, warnings, and errors, configure minimum log levels via appsettings, and use providers to route logs to console, database, or elsewhere.
Explore how the ASP.NET Core 3.1 request pipeline uses middleware to process ATP requests, including authorization, endpoint mapping, and optional short-circuiting.
Explore how filters in ASP.NET Core manage cross-cutting logic across actions and controllers, including authorization, resource, action, and result filters, plus global filters, caching, and JWT authentication.
Explore how to build and apply custom filters in ASP.NET Core, including action filters and exception filters, with dependency-injected logging and global filter configuration.
Configure your ASP.NET Core 3.1 web API to support XML and JSON through content negotiation. Learn to use Accept and Content-Type headers to request and receive data in different formats.
Implement a recurring background task with IHostedService in an ASP.NET Core app, including start/stop lifecycle and a timer that writes to a file every five seconds.
Learn ASP.NET Core 3.1 web api development, covering controllers and actions, routing, model binding and validation, dependency injection, middleware and filters, accept and content-type headers, and recurring background tasks.
Execute a thorough clean-up of the rest api by deleting the weather forecast controller, removing unused filters and logging, and updating startup and validations for entity framework.
Enable efficient data access with entity framework core in dot net apps, generating databases from code, managing migrations and transactions, and supporting sql server, oracle, and cross-platform deployment.
Configure EF Core for the movies API by installing SQL Server packages, creating a DB context with a genera table, and setting up a default connection string and migrations.
Create and persist genres using Entity Framework Core and a repository abstraction by injecting the application context, then expose an API to add and list genres with async saves.
Implement a delete endpoint for genres by id, check existence, remove from the context, save changes asynchronously, and return not found or no content accordingly.
Learn to implement two custom validators for file uploads in ASP.NET Core 3.1: a size validator to limit megabytes and a content type validator for image formats.
Configure a second implementation to save images locally in the www root directory and serve them as static files via startup configuration, enabling local testing and access at localhost.
Learn how to apply partial updates with HTTP patch and JSON Patch in ASP.NET Core, using replace operations to update specific fields while leaving others intact.
Implement pollination in ASP.NET Core 3.1 by delivering records in batches, exposing total pages in the response header, and enforcing a maximum records per page for performance.
Create a movie entity with id, title, summary, in theaters, release date, and poster; migrate the database and implement a movie controller with CRUD and AutoMapper mappings.
Apply dynamic filtering to movie data with entity framework core and query strings, covering title, in theaters, upcoming releases, and genre.
Master eager loading with entity framework core by using include to fetch related data for movies, loading actors and other details, and map them into movie details.
Extend filtering with dynamic ordering by field and direction, using a library to pass order by strings like title ascending or release date descending, and add validation and error handling.
Learn to use entity framework with a coordinated web api, install and configure it, manipulate resources, post files, build a many-to-many relationship, and filter data with a recurring task.
Explore core configuration concepts in ASP.NET Core 3.1 by examining configuration providers, external sources, and configuration files. Address security considerations and user secrets to protect sensitive settings like database servers.
Learn how ASP.NET Core configurations use providers to read environment-specific data such as connection strings from external sources like appsettings.json or environment variables, with code-agnostic access.
Learn how configuration providers, including json files, environment variables, user secrets, and command line arguments, shape ASP.NET core 3.1 apps and how provider order dictates precedence.
Understand how user secrets act as a per-machine configuration provider in ASP.NET Core 3.1, enabling private data storage separate from source code, managed via the user secrets tool.
Expose configuration outside the source code to enable environment-specific values without recompiling, using a configuration service and multiple providers—files, user secrets, environment variables, and command line arguments.
Implement authentication and authorization in an ASP.NET Core web API using tokens and roles. Enable third-party client access, and apply encryption and hashing to secure data.
Build a token renewal mechanism to refresh a jwt when the access token expires, using a one minute expiry example, postman testing, and front-end logic to automatically renew tokens.
Explore hashing with a hash function and salt to securely validate logins, store hashed passwords, and authenticate users without revealing plaintext, using a hash service and a hash result model.
Understand how transport layer security via https encrypts data between web servers and clients to protect privacy, and enforce https with the Strict-Transport-Security header, HSTS middleware, and RequireHttpsAttribute.
Document your web API with Swagger and explore hypermedia constraints (hateoas), while learning API versioning, IActionConstraint usage, and using generic methods with a base controller to reduce duplication.
Learn how to document your ASP.NET Core web API with Swagger and OpenAPI, generate an interactive API docs page, and customize endpoint metadata for clear exploration.
Learn to implement hateoas in a web api by returning resources with hypermedia links for actions like self, list, create, update, and delete, with optional link inclusion.
Learn to implement hateoas in a web api using resource filters to conditionally include links based on a request header, and centralize link generation with a generic links generator.
Discover how Swagger visualizes endpoints, implement web api versioning via a base controller, and use Entity Framework Core for partial queries to reduce code duplication.
Explore automatic testing as a fundamental concept in software engineering, including unit tests and integration tests for a controller.
Automated tests execute experiments repeatedly to validate software changes, ensuring independence and minimal side effects, with preparation, testing, and verification as stages across unit, integration, and other test types.
Use mocks and Moq to isolate the transfer service, testing success and error outcomes by controlling dependencies. Build unit tests that simulate external resources like databases and web services.
Unit test the genres controller with EF Core in-memory and AutoMapper, covering get all, get by id, create, update, delete, and not-found scenarios using a reusable base test.
Perform unit testing of the people controller by mocking IFormFile to simulate file uploads. Validate the get method paging behavior and post creation with and without a file.
Test the movies controller's filter method with unit tests, covering title, theaters, upcoming releases, and genre filters; validate ascending and descending title order and logger-driven error handling for invalid fields.
Test the movie theaters controller with a temporary LocalDB database created for the run, using assembly initialization and cleanup to validate nearby theaters within five kilometers.
Conduct integration testing of the genres controller by building a web application factory, running the API in memory, and validating the get endpoint using an in-memory database.
Test authorization and authentication in a asp.net core integration test using a web application factory; supply a claims principal via a fake user filter to verify protected endpoints.
Learn core testing concepts for REST APIs with ASP.NET Core 3.1, including unit tests with dependencies and in-memory Entity Framework, plus integration testing of the full request pipeline.
Publish the web api to Azure App Service by creating the app service and database, then run entity framework migrations on publish to initialize the database and admin role.
Enable application insights in a asp.net core 3.1 app to capture production logs and exceptions with ILogger, using instrumentation keys and config from app settings or azure environment variables.
Explore configuring health checks in ASP.NET Core 3.1 to monitor overall app health and individual services, including readiness endpoints, database connectivity, and detailed health responses.
Deploy a net core 3.1 web api to IIS by installing the hosting bundle and publishing to a folder, then run migrations at startup and verify with swagger.
Learn how to deploy and monitor production restful APIs built with ASP.NET Core 3.1, with health checks, automation, and CI/CD via GitHub.
Learn how to develop Web APIs with ASP.NET Core from scratch with this incredible course.
We are going to see the entire life cycle of developing a Web API, from creating the solution, developing the endpoints, working on the manipulation of resources, doing automatic testing, and deployment to Azure.
Also, learn how to use Azure DevOps to configure a Continuous Integration and Continuous Delivery pipeline to be able to publish your projects from their source code in Github, Bitbucket, or any other GIT repository provider.