Web API Development for the Absolute Beginner by Irina Dominte
Author:Irina Dominte
Language: eng
Format: epub, pdf
ISBN: 9781484293485
Publisher: Apress
Listing 7-5 Migrations Pointing to the Project Entry Point
Now that we have told the command where to find the connection to the database, it will execute successfully and generate our migrations the same way we have seen in the previous chapter and create a Migrations folder in our project (Figure 7-7).
Figure 7-7 Migrations added
Data Layer, Implementing a Repository
The data layer in a web application refers to the component responsible for accessing and manipulating data. It is responsible for communicating with the data storage mechanism, such as a database, and providing a consistent and unified interface for accessing and manipulating the data. The data layer often implements data access patterns, such as the repository pattern, which provides a separation between the data storage mechanism and the rest of the application.
This makes it easier to change the data storage mechanism in the future, as only the data layer needs to be modified, rather than the rest of the application. The data layer can also provide caching, filtering, validation, and other data-related services to the rest of the application.
The data layer is a core component of a well-architected web application, as it is responsible for managing the data and providing a unified interface for accessing and manipulating it.
In our case, EF Core DBSet classes behave like repositories. We could use them as they are, but our goal is to have a minimum separation of concerns. You will have plenty of time to experiment afterward.
In our Conference.Data project we need to add a new file named SpeakersRepository; it is where we will implement CRUD methods. Our class needs to access ConferenceContext to have access to the database. This means we will need to reference the Conference.Domain project.
Right-click the Dependencies node and select the âAdd Project referenceâ option, in the same way we did earlier for Conference.Domain. You will endup having something similar to Figure 7-8.
Download
Web API Development for the Absolute Beginner by Irina Dominte.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
NET | C & C++ Windows Programming |
SQL Server | VBA |
Visual Basic |
Deep Learning with Python by François Chollet(12523)
Hello! Python by Anthony Briggs(9868)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9758)
The Mikado Method by Ola Ellnestam Daniel Brolund(9748)
Dependency Injection in .NET by Mark Seemann(9294)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8259)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7742)
Grails in Action by Glen Smith Peter Ledbrook(7668)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7518)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(6746)
Microservices with Go by Alexander Shuiskov(6513)
Practical Design Patterns for Java Developers by Miroslav Wengner(6411)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6389)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6379)
Angular Projects - Third Edition by Aristeidis Bampakos(5769)
The Art of Crafting User Stories by The Art of Crafting User Stories(5300)
NetSuite for Consultants - Second Edition by Peter Ries(5244)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5062)
Kotlin in Action by Dmitry Jemerov(5020)
