Use Full Of Repository Pattern
Here I will discuss the what is repository pattern and why it is useful.
In somany many applications, the business logic accesses data from data stores such as databases, SharePoint lists, or Web services.SO Directly accessing the data can result in the follodirect wing:
- Duplicated code
- A higher potential for programming errors
- An inability to easily test the business logic
A repository separates the business logic from the direct interactions with the underlying data source or Web service.
The Benefits are
It provides a substitution point for the unit tests.
MAintainebility of codes
Interactions of the repository to Datasource