7.4.4 Creating the Entity Framework Context; Listing 7-12. The Content of the EFDbContext.cs File

chap07
Jason Zhu 2021-09-08 11:35:12 +10:00
parent f2c0d2ca09
commit cacc3e1580
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,10 @@
using SportsStore.Domain.Entities;
using System.Data.Entity;
namespace SportsStore.Domain.Concrete
{
public class EFDbContext : DbContext
{
public DbSet<Product> Products { get; set; }
}
}

View File

@ -73,6 +73,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Abstract\IProductRepository.cs" /> <Compile Include="Abstract\IProductRepository.cs" />
<Compile Include="Concrete\EFDbContext.cs" />
<Compile Include="Entities\Product.cs" /> <Compile Include="Entities\Product.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>