7.4.5 Creating the Product Repository; e.g. 7.13 EFProductRepository.cs
This commit is contained in:
parent
e44a5f26aa
commit
5ec3a1b095
@ -0,0 +1,19 @@
|
|||||||
|
using SportsStore.Domain.Abstract;
|
||||||
|
using SportsStore.Domain.Entities;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SportsStore.Domain.Concrete
|
||||||
|
{
|
||||||
|
public class EFProductRepository : IProductRepository
|
||||||
|
{
|
||||||
|
private EFDbContext context = new EFDbContext();
|
||||||
|
public IQueryable<Product> Products
|
||||||
|
{
|
||||||
|
get { return context.Products; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -70,6 +70,7 @@
|
|||||||
<Compile Include="Abstract\IProductRepository.cs" />
|
<Compile Include="Abstract\IProductRepository.cs" />
|
||||||
<Compile Include="Class1.cs" />
|
<Compile Include="Class1.cs" />
|
||||||
<Compile Include="Concrete\EFDbContext.cs" />
|
<Compile Include="Concrete\EFDbContext.cs" />
|
||||||
|
<Compile Include="Concrete\EFProductRepository.cs" />
|
||||||
<Compile Include="Entities\Product.cs" />
|
<Compile Include="Entities\Product.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user