File tree 7 files changed +11
-11
lines changed
test/JsonApiDotNetCoreTests/IntegrationTests
ResourceInheritance/Models
7 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ public sealed class Playlist : Identifiable<long>
12
12
[ Attr ]
13
13
public string Name { get ; set ; } = null ! ;
14
14
15
- [ NotMapped ]
16
15
[ Attr ]
16
+ [ NotMapped ]
17
17
public bool IsArchived => false ;
18
18
19
19
[ HasMany ]
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ public sealed class Building : Identifiable<int>
14
14
[ Attr ]
15
15
public string Number { get ; set ; } = null ! ;
16
16
17
- [ NotMapped ]
18
17
[ Attr ]
18
+ [ NotMapped ]
19
19
public int WindowCount => Windows . Count ;
20
20
21
- [ NotMapped ]
22
21
[ Attr ( Capabilities = AttrCapabilities . AllowView | AttrCapabilities . AllowChange ) ]
22
+ [ NotMapped ]
23
23
public string PrimaryDoorColor
24
24
{
25
25
get
@@ -50,8 +50,8 @@ public string PrimaryDoorColor
50
50
}
51
51
}
52
52
53
- [ NotMapped ]
54
53
[ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
54
+ [ NotMapped ]
55
55
public string ? SecondaryDoorColor => SecondaryDoor ? . Color ;
56
56
57
57
[ EagerLoad ]
Original file line number Diff line number Diff line change @@ -12,16 +12,16 @@ public sealed class Street : Identifiable<int>
12
12
[ Attr ]
13
13
public string Name { get ; set ; } = null ! ;
14
14
15
- [ NotMapped ]
16
15
[ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
16
+ [ NotMapped ]
17
17
public int BuildingCount => Buildings . Count ;
18
18
19
- [ NotMapped ]
20
19
[ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
20
+ [ NotMapped ]
21
21
public int DoorTotalCount => Buildings . Sum ( building => building . SecondaryDoor == null ? 1 : 2 ) ;
22
22
23
- [ NotMapped ]
24
23
[ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
24
+ [ NotMapped ]
25
25
public int WindowTotalCount => Buildings . Sum ( building => building . WindowCount ) ;
26
26
27
27
[ EagerLoad ]
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ public sealed class WorkItem : Identifiable<int>
18
18
[ Attr ]
19
19
public WorkItemPriority Priority { get ; set ; }
20
20
21
- [ NotMapped ]
22
21
[ Attr ( Capabilities = AttrCapabilities . All & ~ ( AttrCapabilities . AllowCreate | AttrCapabilities . AllowChange ) ) ]
22
+ [ NotMapped ]
23
23
public bool IsImportant
24
24
{
25
25
get => Priority == WorkItemPriority . High ;
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ public sealed class WorkItemGroup : Identifiable<Guid>
15
15
[ Attr ]
16
16
public bool IsPublic { get ; set ; }
17
17
18
- [ NotMapped ]
19
18
[ Attr ]
19
+ [ NotMapped ]
20
20
public bool IsDeprecated => ! string . IsNullOrEmpty ( Name ) && Name . StartsWith ( "DEPRECATED:" , StringComparison . OrdinalIgnoreCase ) ;
21
21
22
22
[ HasOne ]
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceInheritance.Models;
9
9
[ Resource ( ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceInheritance" , GenerateControllerEndpoints = JsonApiEndpoints . None ) ]
10
10
public sealed class AlwaysMovingTandem : Bike
11
11
{
12
- [ NotMapped ]
13
12
[ Attr ]
13
+ [ NotMapped ]
14
14
public Guid LocationToken
15
15
{
16
16
get => Guid . NewGuid ( ) ;
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ public sealed class Game : Identifiable<int?>
13
13
[ Attr ]
14
14
public string Title { get ; set ; } = null ! ;
15
15
16
- [ NotMapped ]
17
16
[ Attr ]
17
+ [ NotMapped ]
18
18
public Guid SessionToken => Guid . NewGuid ( ) ;
19
19
20
20
[ HasOne ]
You can’t perform that action at this time.
0 commit comments