Skip to content

Commit d6f3c19

Browse files
committed
play module added
1 parent 5b1340d commit d6f3c19

File tree

5 files changed

+38
-3
lines changed

5 files changed

+38
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.user
77
*.userosscache
88
*.sln.docstates
9+
src/AwesomeDotNetCore.Web/appsettings.Development.json
910

1011
# User-specific files (MonoDevelop/Xamarin Studio)
1112
*.userprefs

src/AwesomeDotNetCore.Data/Context/AdventureWorksDbSets.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ public partial class AdventureWorks
8282
public virtual DbSet<WorkOrder> WorkOrder { get; set; }
8383
public virtual DbSet<WorkOrderRouting> WorkOrderRouting { get; set; }
8484

85-
// Unable to generate entity type for table 'Production.ProductDocument'. Please see the warning messages.
86-
// Unable to generate entity type for table 'Production.Document'. Please see the warning messages.
85+
86+
public virtual DbSet<Player> Players { get; set; }
87+
public virtual DbSet<Team> Team { get; set; }
8788
#endregion
8889
}
8990
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations.Schema;
4+
5+
namespace AwesomeDotNetCore.Data.Models
6+
{
7+
[Table("Player", Schema = "Play")]
8+
public partial class Player
9+
{
10+
public int Id { get; set; }
11+
public string Name { get; set; }
12+
public Team Team { get; set; }
13+
}
14+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations.Schema;
4+
5+
namespace AwesomeDotNetCore.Data.Models
6+
{
7+
[Table("Team", Schema = "Play")]
8+
public partial class Team
9+
{
10+
public Team()
11+
{
12+
Players = new HashSet<Player>();
13+
}
14+
15+
public int Id { get; set; }
16+
public int Name { get; set; }
17+
public virtual ICollection<Player> Players { get; set; }
18+
}
19+
}

src/AwesomeDotNetCore.Web/appsettings.Development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"ConnectionStrings": {
3-
"AdventureWorksConnection": "Data Source=SG2327780W2\\SQLSTANDARD2017;Initial Catalog=AdventureWorks2017;Persist Security Info=True;User ID=dbadmin;Password=AtmLg69K",
3+
"AdventureWorksConnection": "Data Source=SHIHAM\\SQLEXPRESS01;Initial Catalog=AdventureWorks2017;Persist Security Info=True;User ID=dbadmin;Password=AtmLg69K",
44
"Logging": {
55
"LogLevel": {
66
"Default": "Debug",

0 commit comments

Comments
 (0)