Question: C# using visual studio Create a console app that uses an EF data model to access the Players table in the database provided. 1 .
C# using visual studio
Create a console app that uses an EF data model to access the Players table in the database provided.
Create a console app named BaseballApp.
Use the NuGet package manager to install the following packages: o Microsoft.EntityFrameworkCore
o Microsoft.EntityFrameworkCore.Tools
o Microsoft.EntityFrameworkCore.SqlServer
o Microsoft.EntityFrameworkCore.Design
Using the Package Manager console, enter the following ScaffoldDbContext command to construct a data model with a DbContext class named BaseballContext for the Baseball.mdf file provided. More details on this command may be found here
ScaffoldDbContext connStr Microsoft.EntityFrameworkCore.SqlServer Context name
where connStr is a connection string and name is the name for the DbContext class
Instantiate the BaseballContext class in the console app.
Use the OrderBy method to display the names and batting averages of all players in the Players table in ascending order by the players batting average.
Use the Where method to display the name and averages of only the players whose first names begin with J
Display all players again after adding yourself to the player table with an average of
Change your average to
After this change, display only players with averages over
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
