Загрузка...

Part 10: Upload History + Preparing for a Generic Repository Pattern | ASP.NET Core MVC

Hello everyone! 👋 Welcome to Part 10 of our ASP.NET Core MVC Project Series. In this episode, we're revisiting and improving our application based on valuable feedback received during a demo with my manager.

🔧 What’s New in This Update?
This video focuses on a post-demo enhancement—the implementation of an Upload History feature. Since we already had functionality for uploading files, we expanded on that by:

📁 1. Creating an Upload History Table:
We used Entity Framework Core's Code First approach by adding a new migration to introduce a table that logs metadata about uploaded files (such as filename, upload date, uploader, etc.).

💾 2. Saving Actual Files on the Server:
Beyond just tracking upload history in the database, we also persist the uploaded files to a designated folder on the web server, ensuring the application supports both data traceability and file recovery.

📂 3. Building a Dedicated Repository:
As with our previous database entities, we created a repository specifically for Upload History, enabling clean, organized access to the table via the data access layer.

💡 But Wait — There's a Problem We Need to Solve...
With every new table, we’re creating a separate repository, which increases boilerplate code and maintenance overhead. That’s why we introduce the idea of a Generic Repository and Unit of Work Pattern.

🔄 This pattern helps us:
-Avoid code duplication
-Centralize transaction management
-Make our data layer scalable and testable
-Keep our codebase cleaner and more maintainable

👉 Ready to implement it? Check out this video where we break down the full implementation of the Generic Repository + Unit of Work Design Pattern:
📌 https://youtu.be/RUonYLVSYKg

Видео Part 10: Upload History + Preparing for a Generic Repository Pattern | ASP.NET Core MVC канала Learn@EdwinDeloso
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки