Unit of Work Pattern: (যদি কোনো data গুলো database থেকে আনি বা commit করি তবে যেনো সব কাজ একসাথে হয় অথবা কোনোটিই না হয় এটাই unit of pattern.                          এটিও martin fowler বইয়ে আছে। এটি মূলত database transaction এই transaction feature টি শুধু database এর write operation এ হয়। ধরি ডেটাবেইস থকে data আনার সময় কিছু data আসলো আর কিছু রয়ে গেলো, যা কাম্য নয়। So এই transaction ensure করে সব data আসছে কিনা। Unit of work pattern ঠিক এভাবেই কিছু oop way তে transaction করা আছে যাতে করে how many row affected on database  সেটা আমরা জানতে পারি। এটিও entity framework এ already implemented) The Unit of Work (UoW) pattern is a design pattern used in software engineering to manage transactions and the state of multiple objects within a single business transaction. The UoW pattern is commonly used in applications that require the coordination of multiple data sources or services, such as enterprise applications, e-commerce systems, and banking applications. The UoW pattern is used to group all operations that must be performed within a transaction, such as creating, updating, and deleting objects. The UoW pattern is responsible for tracking changes made to the objects within the transaction and persisting those changes to the underlying data store in a single, atomic transaction. The UoW pattern typically consists of two main components: the Unit of Work and the Repository. The Unit of Work acts as an intermediary between the application and the data store, providing a consistent interface for performing CRUD (Create, Read, Update, Delete) operations on the data. The Repository provides an abstraction layer that encapsulates the data access logic, allowing the application to work with domain objects instead of low-level data structures. The UoW pattern provides several benefits to software developers, including improved performance, reduced complexity, and increased flexibility. By grouping multiple operations within a single transaction, the UoW pattern reduces the number of round trips to the data store, improving performance. The UoW pattern also simplifies the application architecture by abstracting away the details of data access and management, reducing complexity. Finally, the UoW pattern makes it easier to change the underlying data store or services without affecting the rest of the application, increasing flexibility.