Skip to content

Commit 34145bc

Browse files
authored
Merge pull request #1 from platyscript/update-readme
Update readme
1 parent 5ccac25 commit 34145bc

956 files changed

Lines changed: 53586 additions & 55377 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
45
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
56
<TargetFramework>net9.0</TargetFramework>
67
</PropertyGroup>

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.2" />
2727
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.2" />
2828
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.2" />
29-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
29+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.2" />
3030
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.2" />
3131
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.2" />
3232
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.2" />
3333
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.2" />
34-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.0" />
35-
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.2" />
36-
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
34+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.2" />
35+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.6" />
36+
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.2" />
3737
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
3838
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
3939
<PackageVersion Include="NimblePros.Metronome" Version="0.4.0" />

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ A project template that I use to quickly create a set of repository classes for
1717

1818
# Build solution
1919

20-
First, initialize the submodule using `git submodule update --init`.
20+
First, initialize the submodules using `git submodule update --init`.
2121

22-
Build the solution - `Platy.AdventureWorks.Repostory.sln`
22+
Build the solution - `Platy.AdventureWorks.Repository.sln`.
23+
24+
Open the solution - `EntityFrameworkCore.Generator/EntityFrameworkCore.Generator.sln` and build it.
25+
This is one of the submodules downloaded.
26+
27+
Execute the command `..\..\efg\EntityFrameworkCore.Generator.exe generate -f .\entity-generation.yml`.
28+
This generates the domain files. Make sure adventure works database is available.

src/Platy.AdventureWorks.Repository/Data/AdventureWorksContext.cs

Lines changed: 808 additions & 986 deletions
Large diffs are not rendered by default.
Lines changed: 128 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,138 @@
1-
using System.ComponentModel.DataAnnotations;
2-
using System.ComponentModel.DataAnnotations.Schema;
1+
using System;
2+
using System.Collections.Generic;
33

44
namespace Platy.AdventureWorks.Repository.Data.Entities;
55

66
/// <summary>
7-
/// Entity class representing data for table 'Address'.
7+
/// Entity class representing data for table 'Address'.
88
/// </summary>
9-
[Table("Address", Schema = "Person")]
10-
public class Address
11-
: HasDomainEventsBase, IIdentity<int>
9+
[System.ComponentModel.DataAnnotations.Schema.Table("Address", Schema = "Person")]
10+
public partial class Address
11+
: HasDomainEventsBase, IIdentity<int>
1212
{
13-
/// <summary>
14-
/// Initializes a new instance of the <see cref="Address" /> class.
15-
/// </summary>
16-
public Address()
17-
{
18-
#region Generated Constructor
13+
/// <summary>
14+
/// Initializes a new instance of the <see cref="Address"/> class.
15+
/// </summary>
16+
public Address()
17+
{
18+
#region Generated Constructor
19+
BillToSalesOrderHeaders = new HashSet<SalesOrderHeader>();
20+
BusinessEntityAddresses = new HashSet<BusinessEntityAddress>();
21+
ShipToSalesOrderHeaders = new HashSet<SalesOrderHeader>();
22+
#endregion
23+
}
24+
25+
#region Generated Properties
26+
/// <summary>
27+
/// Gets or sets the property value representing column 'AddressID'.
28+
/// </summary>
29+
/// <value>
30+
/// The property value representing column 'AddressID'.
31+
/// </value>
32+
[System.ComponentModel.DataAnnotations.Key()]
33+
[System.ComponentModel.DataAnnotations.Schema.Column("AddressID", TypeName = "int")]
34+
[System.ComponentModel.DataAnnotations.Schema.DatabaseGenerated(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity)]
35+
public int Id { get; set; }
36+
37+
/// <summary>
38+
/// Gets or sets the property value representing column 'AddressLine1'.
39+
/// </summary>
40+
/// <value>
41+
/// The property value representing column 'AddressLine1'.
42+
/// </value>
43+
[System.ComponentModel.DataAnnotations.Schema.Column("AddressLine1", TypeName = "nvarchar(60)")]
44+
public string AddressLine1 { get; set; } = null!;
45+
46+
/// <summary>
47+
/// Gets or sets the property value representing column 'AddressLine2'.
48+
/// </summary>
49+
/// <value>
50+
/// The property value representing column 'AddressLine2'.
51+
/// </value>
52+
[System.ComponentModel.DataAnnotations.Schema.Column("AddressLine2", TypeName = "nvarchar(60)")]
53+
public string? AddressLine2 { get; set; }
54+
55+
/// <summary>
56+
/// Gets or sets the property value representing column 'City'.
57+
/// </summary>
58+
/// <value>
59+
/// The property value representing column 'City'.
60+
/// </value>
61+
[System.ComponentModel.DataAnnotations.Schema.Column("City", TypeName = "nvarchar(30)")]
62+
public string City { get; set; } = null!;
63+
64+
/// <summary>
65+
/// Gets or sets the property value representing column 'StateProvinceID'.
66+
/// </summary>
67+
/// <value>
68+
/// The property value representing column 'StateProvinceID'.
69+
/// </value>
70+
[System.ComponentModel.DataAnnotations.Schema.Column("StateProvinceID", TypeName = "int")]
71+
public int StateProvinceId { get; set; }
72+
73+
/// <summary>
74+
/// Gets or sets the property value representing column 'PostalCode'.
75+
/// </summary>
76+
/// <value>
77+
/// The property value representing column 'PostalCode'.
78+
/// </value>
79+
[System.ComponentModel.DataAnnotations.Schema.Column("PostalCode", TypeName = "nvarchar(15)")]
80+
public string PostalCode { get; set; } = null!;
81+
82+
/// <summary>
83+
/// Gets or sets the property value representing column 'rowguid'.
84+
/// </summary>
85+
/// <value>
86+
/// The property value representing column 'rowguid'.
87+
/// </value>
88+
[System.ComponentModel.DataAnnotations.Schema.Column("rowguid", TypeName = "uniqueidentifier")]
89+
public Guid Rowguid { get; set; }
90+
91+
/// <summary>
92+
/// Gets or sets the property value representing column 'ModifiedDate'.
93+
/// </summary>
94+
/// <value>
95+
/// The property value representing column 'ModifiedDate'.
96+
/// </value>
97+
[System.ComponentModel.DataAnnotations.Schema.Column("ModifiedDate", TypeName = "datetime")]
98+
public DateTime ModifiedDate { get; set; }
1999

20-
BillToSalesOrderHeaders = new HashSet<SalesOrderHeader>();
21-
BusinessEntityAddresses = new HashSet<BusinessEntityAddress>();
22-
ShipToSalesOrderHeaders = new HashSet<SalesOrderHeader>();
100+
#endregion
101+
102+
#region Generated Relationships
103+
/// <summary>
104+
/// Gets or sets the navigation collection for entity <see cref="SalesOrderHeader" />.
105+
/// </summary>
106+
/// <value>
107+
/// The navigation collection for entity <see cref="SalesOrderHeader" />.
108+
/// </value>
109+
public virtual ICollection<SalesOrderHeader> BillToSalesOrderHeaders { get; set; }
110+
111+
/// <summary>
112+
/// Gets or sets the navigation collection for entity <see cref="BusinessEntityAddress" />.
113+
/// </summary>
114+
/// <value>
115+
/// The navigation collection for entity <see cref="BusinessEntityAddress" />.
116+
/// </value>
117+
public virtual ICollection<BusinessEntityAddress> BusinessEntityAddresses { get; set; }
118+
119+
/// <summary>
120+
/// Gets or sets the navigation collection for entity <see cref="SalesOrderHeader" />.
121+
/// </summary>
122+
/// <value>
123+
/// The navigation collection for entity <see cref="SalesOrderHeader" />.
124+
/// </value>
125+
public virtual ICollection<SalesOrderHeader> ShipToSalesOrderHeaders { get; set; }
126+
127+
/// <summary>
128+
/// Gets or sets the navigation property for entity <see cref="StateProvince" />.
129+
/// </summary>
130+
/// <value>
131+
/// The navigation property for entity <see cref="StateProvince" />.
132+
/// </value>
133+
/// <seealso cref="StateProvinceId" />
134+
public virtual StateProvince StateProvince { get; set; } = null!;
23135

24136
#endregion
25-
}
26-
27-
#region Generated Properties
28-
29-
/// <summary>
30-
/// Gets or sets the property value representing column 'AddressID'.
31-
/// </summary>
32-
/// <value>
33-
/// The property value representing column 'AddressID'.
34-
/// </value>
35-
[Key]
36-
[Column("AddressID", TypeName = "int")]
37-
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
38-
public int Id { get; set; }
39-
40-
/// <summary>
41-
/// Gets or sets the property value representing column 'AddressLine1'.
42-
/// </summary>
43-
/// <value>
44-
/// The property value representing column 'AddressLine1'.
45-
/// </value>
46-
[Column("AddressLine1", TypeName = "nvarchar(60)")]
47-
public string AddressLine1 { get; set; } = null!;
48-
49-
/// <summary>
50-
/// Gets or sets the property value representing column 'AddressLine2'.
51-
/// </summary>
52-
/// <value>
53-
/// The property value representing column 'AddressLine2'.
54-
/// </value>
55-
[Column("AddressLine2", TypeName = "nvarchar(60)")]
56-
public string? AddressLine2 { get; set; }
57-
58-
/// <summary>
59-
/// Gets or sets the property value representing column 'City'.
60-
/// </summary>
61-
/// <value>
62-
/// The property value representing column 'City'.
63-
/// </value
64-
[Column("City", TypeName = "nvarchar(30)")]
65-
public string City { get; set; } = null!;
66-
67-
/// <summary>
68-
/// Gets or sets the property value representing column 'StateProvinceID'.
69-
/// </summary>
70-
/// <value>
71-
/// The property value representing column 'StateProvinceID'.
72-
/// </value>
73-
[Column("StateProvinceID", TypeName = "int")]
74-
public int StateProvinceId { get; set; }
75-
76-
/// <summary>
77-
/// Gets or sets the property value representing column 'PostalCode'.
78-
/// </summary>
79-
/// <value>
80-
/// The property value representing column 'PostalCode'.
81-
/// </value>
82-
[Column("PostalCode", TypeName = "nvarchar(15)")]
83-
public string PostalCode { get; set; } = null!;
84-
85-
/// <summary>
86-
/// Gets or sets the property value representing column 'rowguid'.
87-
/// </summary>
88-
/// <value>
89-
/// The property value representing column 'rowguid'.
90-
/// </value>
91-
[Column("rowguid", TypeName = "uniqueidentifier")]
92-
public Guid Rowguid { get; set; }
93-
94-
/// <summary>
95-
/// Gets or sets the property value representing column 'ModifiedDate'.
96-
/// </summary>
97-
/// <value>
98-
/// The property value representing column 'ModifiedDate'.
99-
/// </value>
100-
[Column("ModifiedDate", TypeName = "datetime")]
101-
public DateTime ModifiedDate { get; set; }
102-
103-
#endregion
104-
105-
#region Generated Relationships
106-
107-
/// <summary>
108-
/// Gets or sets the navigation collection for entity <see cref="SalesOrderHeader" />.
109-
/// </summary>
110-
/// <value>
111-
/// The navigation collection for entity <see cref="SalesOrderHeader" />.
112-
/// </value>
113-
public virtual ICollection<SalesOrderHeader> BillToSalesOrderHeaders { get; set; }
114-
115-
/// <summary>
116-
/// Gets or sets the navigation collection for entity <see cref="BusinessEntityAddress" />.
117-
/// </summary>
118-
/// <value>
119-
/// The navigation collection for entity <see cref="BusinessEntityAddress" />.
120-
/// </value>
121-
public virtual ICollection<BusinessEntityAddress> BusinessEntityAddresses { get; set; }
122-
123-
/// <summary>
124-
/// Gets or sets the navigation collection for entity <see cref="SalesOrderHeader" />.
125-
/// </summary>
126-
/// <value>
127-
/// The navigation collection for entity <see cref="SalesOrderHeader" />.
128-
/// </value>
129-
public virtual ICollection<SalesOrderHeader> ShipToSalesOrderHeaders { get; set; }
130-
131-
/// <summary>
132-
/// Gets or sets the navigation property for entity <see cref="StateProvince" />.
133-
/// </summary>
134-
/// <value>
135-
/// The navigation property for entity <see cref="StateProvince" />.
136-
/// </value>
137-
/// <seealso cref="StateProvinceId" />
138-
public virtual StateProvince StateProvince { get; set; } = null!;
139-
140-
#endregion
137+
141138
}

0 commit comments

Comments
 (0)