Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b7e365c

Browse files
EF.Core changes applied
1 parent 2ad1797 commit b7e365c

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

‎AspnetRunBasics/AspnetRunBasics.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
@@ -7,13 +7,10 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
1011
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.10" />
1112
</ItemGroup>
1213

13-
<ItemGroup>
14-
<Folder Include="Data\" />
15-
</ItemGroup>
16-
1714

1815

1916
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /