Skip to content

Commit 535bd6c

Browse files
author
raihanM95
committed
Create RepositoryContext and added Product
1 parent 4567015 commit 535bd6c

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Domain.Entities;
2+
using Microsoft.EntityFrameworkCore;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Text;
6+
7+
namespace Infrastructure.Persistence.Contexts
8+
{
9+
public class RepositoryContext : DbContext
10+
{
11+
public RepositoryContext(DbContextOptions options)
12+
: base(options)
13+
{
14+
}
15+
16+
public DbSet<Product> Products { get; set; }
17+
}
18+
}

Infrastructure.Persistence/Infrastructure.Persistence.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<Folder Include="Contexts\" />
8+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.2" />
9+
</ItemGroup>
10+
11+
<ItemGroup>
12+
<ProjectReference Include="..\Domain\Domain.csproj" />
913
</ItemGroup>
1014

1115
</Project>

0 commit comments

Comments
 (0)