LINQ queries can be really easy to use against the database with EF Core, but they can also end up containing a lot of business logic that should be tested.
- [Instructor] We have a lot of good setup for testing…in place, but there's one more piece I want to cover.…Link queries can be really easy to use against the database…with EF Core, but they can also end up containing a lot…of business logic that ought to be tested.…Let's add a DAL test, forget by partial customer last name,…in the order repository.…Let's look quickly at the method to see what it's doing.…Open the DAL project and the order repository.…
Scroll down in the method.…We can see that it's checking…for orders that are not deleted,…where the customer's last name contains the search term,…and it's using ToLowerInvariant…so that it's case-insensitive.…With EF Core, we can test this logic.…Let's open up the DAL.tests project,…and we'll add a new file, OrderRepositoryTests.…
Right-click, Add, Class.…First, we'll add a using statement…for the Visual Studio test tools.…using Microsoft.VisualStudio.TestTools.UnitTesting.…Now, we'll make the class a test class…by adding the TestClass attribute, making the class public,…
- What is good application architecture?
- Real-world software and the SDLC
- Common knowledge and maintenance
- Choosing an architecture
- Design patterns with EF
- Debugging and error handling
- Architecture for the web with ASP.NET
- Designing for unit testing
- Strategies for dealing with common performance issues
Skill Level Advanced
Deploying ASP.NET Core Applications (2017)with Nate Barbettini57m 57s Intermediate
Microsoft SQL Server 2016 Essential Trainingwith Martin Guidry3h 18m Intermediate
1. Why Do All of This Architecture?
2. Design Patterns with EF
3. Error Handling
4. Architecture for the Web with ASP.NET
5. Designing for Unit Testing
6. Entity Framework Mistakes
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.