File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 1
- <Project Sdk =" Microsoft.NET.Sdk.Web" >
1
+ <Project Sdk =" Microsoft.NET.Sdk.Web" >
2
2
3
3
<PropertyGroup >
4
4
<TargetFramework >netcoreapp3.1</TargetFramework >
7
7
</PropertyGroup >
8
8
9
9
<ItemGroup >
10
+ <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 3.1.1" />
10
11
<PackageReference Include =" Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version =" 1.9.10" />
11
12
</ItemGroup >
12
13
13
- <ItemGroup >
14
- <Folder Include =" Data\" />
15
- </ItemGroup >
16
-
17
14
18
15
19
16
</Project >
Original file line number Diff line number Diff line change
1
+ using AspnetRunBasics . Entities ;
2
+ using Microsoft . EntityFrameworkCore ;
3
+
4
+ namespace AspnetRunBasics . Data
5
+ {
6
+ public class AspnetRunContext : DbContext
7
+ {
8
+ public AspnetRunContext ( DbContextOptions < AspnetRunContext > options )
9
+ : base ( options )
10
+ {
11
+ }
12
+
13
+ public DbSet < Product > Products { get ; set ; }
14
+ public DbSet < Category > Categories { get ; set ; }
15
+ public DbSet < Cart > Carts { get ; set ; }
16
+ public DbSet < CartItem > CartItems { get ; set ; }
17
+ public DbSet < Order > Orders { get ; set ; }
18
+ public DbSet < Contact > Contacts { get ; set ; }
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments