
https://github.com/gavilanch/MoviesAPI
Explore what an API is and how RESTful web APIs meet its characteristics, then learn basics of HTTP, including the anatomy of an HTTP request, HTTP methods, and status codes.
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.
Explain the anatomy of an ACP request and response, detailing the request line, headers, and optional body, and show how ACP methods like read and post target API resources.
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.
Learn the five http status code categories: informational, successful, redirect, client error, and server error, with examples like 100 continue, 200 ok, 404 not found, and 500 internal server error.
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.
Discover how ASP.NET Core delivers cross-platform, cloud-ready web APIs with high performance, built-in dependency injection, and easy testing, plus Docker deployment.
Install Visual Studio Community Edition, configure .NET Core workloads, verify the .NET Core 3.1 SDK, and create a web API project to run and test controllers and sample data.
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 evolution of SPRO NET Framework theme for high-demand web APIs and set up your development environment with Visual Studio to start building a movie API using ASP.NET Core 3.1.
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 ASP.NET Core 3.1 builds RESTful web APIs by connecting controllers and actions to HTTP methods and endpoints, using an in-memory repository and route attributes.
Explore routing by attribute in ASP.NET Core to define base endpoints, templates, and placeholders, enabling multiple endpoints and parameter binding with query strings and route constraints.
Explore return types from actions in ASP.NET Core, including specific types, actual result, and ActionResult<T>, to flexibly return genre data with ok, not found, or no content.
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.
Discover how dependency injection enables loose coupling by replacing hard-coded controller and repository dependencies with interfaces and the ASP.NET Core 3.1 DI system.
Configure dependency injection lifetimes in start-up services to manage an in-memory repository. Explore singleton, scope, and transient lifetimes and their effects across HTTP requests.
Show how to return 201 created with a location header when creating a resource, by naming the route (get genera) and passing the new id so clients access the resource.
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.
Explore building a movies API with entity framework to create database, manipulate resources, and delete them, define relationships between people and movies, and apply filtering, ordering, file uploads, and AutoMapper.
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.
Learn to use data transfer objects to shape API responses and protect internal entities. Use AutoMapper with profiles to map entities to DTOs automatically, reducing maintenance and preventing data leakage.
Update the genre resource with an http put on the endpoint identified by its id using a routing template, updating every field and confirming the change with no content response.
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.
Define the person entity with name, biography, date of birth, and a picture stored as a string. Build an api controller with dto mapping to support list, get, and create.
Receive an image in an ASP.NET Core 3.1 web API using IFormFile from form data, store it on the server, and save its path in the people table.
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.
Create an Azure storage account and blob containers, connect via a storage string, and save images. Implement a storage service that uploads files to blob storage and verify with Postman.
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.
Update and delete people by applying partial updates that modify only changed fields and conditionally replace profile pictures, using automapper with EF Core and an edit file workflow.
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.
Shows how to implement many-to-many relationships between movies and genres and between movies and actors, using join tables, composite keys via fluent API, and a custom binder with AutoMapper mapping.
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.
Implement a background task in ASP.NET Core 3.1 using Entity Framework Core to automatically update movies in theaters when today's date matches their release date.
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.
Configure identity-based authentication with JWT bearer tokens in your ASP.NET Core 3.1 API, set up identity context with EF Core, add migrations, and secure endpoints with authentication and authorization.
Create an accounts controller to register users and issue a jwt with expiration, using claims and signing credentials, then authenticate subsequent requests with a bearer token.
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.
Implement role-based access control by creating an admin role, assigning it to users, and protecting endpoints with policy-based authorization in an ASP.NET Core API.
Explain the browser same-origin policy and how CORS enables cross-origin requests, then configure ASP.NET Core 3.1 CORS in startup with a policy and per-endpoint application.
Understand how encryption uses a data protection provider and keys to turn plain text into encrypted text, and implement time-bound encryption with protectors for controlled decryption.
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.
Acquire hands-on experience with authentication and authorization in a web api, using the authorized attribute to restrict endpoints to authenticated users or roles, while configuring browser-based access, encryption, and hashing.
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.
Create a movie theater entity with a geography point location and perform spatial queries using net topology suite with entity framework core, returning distance in kilometers.
Implement API versioning in ASP.NET Core 3.1 using an action constraint and a header-based version indicator to route requests to versioned controllers.
Create a custom base controller to reduce repetitive CRUD code using generics, an interface, and a shared context and mapper. Apply reusable endpoints for entities like genre, movie, and person.
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.
Perform code cleanup by removing unused hateoas attributes and headers from controllers and the general controller. Remove unused services and related code to prepare to start this module.
Understand the basic concepts and properties of automated software testing and why automation helps verify web pages, mobile apps, consoles, and web APIs efficiently.
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.
Learn unit testing by building a fictitious account and a transfer service to validate wire transfers between accounts, using negative and positive tests, assertions, and mocks.
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.
Unit test the accounts controller by mocking UserManager and SignInManager, create and log in users, and configure in memory stores and JWT settings for authenticated requests.
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.
Integration testing verifies that all parts of a web app work together, testing pipeline processes on the web host and MVC, and often separating unit and integration tests.
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 application to production, create a production database, and configure application insights to monitor errors. Run health checks, apply migrations, and enable continuous deployment for automatic publishing.
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.
Demonstrates Azure DevOps continuous integration and delivery, showing automated build, test, and deployment of a movies API to staging and production with pipelines and release management.
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.