7.4.5 Creating the Product Repository; Listing 7-14. The Contents of the EFProductRepository.cs File
parent
997043a3db
commit
46fbd3ed91
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using SportsStore.Domain.Abstract;
|
||||
using SportsStore.Domain.Entities;
|
||||
|
||||
namespace SportsStore.Domain.Concrete
|
||||
{
|
||||
public class EFProductRepository : IProductRepository
|
||||
{
|
||||
private EFDbContext context = new EFDbContext();
|
||||
|
||||
public IEnumerable<Product> Products
|
||||
{
|
||||
get { return context.Products; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -74,6 +74,7 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="Abstract\IProductRepository.cs" />
|
||||
<Compile Include="Concrete\EFDbContext.cs" />
|
||||
<Compile Include="Concrete\EFProductRepository.cs" />
|
||||
<Compile Include="Entities\Product.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue