File tree Expand file tree Collapse file tree 7 files changed +11
-11
lines changed
test/JsonApiDotNetCoreTests/IntegrationTests
ResourceInheritance/Models Expand file tree Collapse file tree 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>
1212 [ Attr ]
1313 public string Name { get ; set ; } = null ! ;
1414
15- [ NotMapped ]
1615 [ Attr ]
16+ [ NotMapped ]
1717 public bool IsArchived => false ;
1818
1919 [ HasMany ]
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ public sealed class Building : Identifiable<int>
1414 [ Attr ]
1515 public string Number { get ; set ; } = null ! ;
1616
17- [ NotMapped ]
1817 [ Attr ]
18+ [ NotMapped ]
1919 public int WindowCount => Windows . Count ;
2020
21- [ NotMapped ]
2221 [ Attr ( Capabilities = AttrCapabilities . AllowView | AttrCapabilities . AllowChange ) ]
22+ [ NotMapped ]
2323 public string PrimaryDoorColor
2424 {
2525 get
@@ -50,8 +50,8 @@ public string PrimaryDoorColor
5050 }
5151 }
5252
53- [ NotMapped ]
5453 [ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
54+ [ NotMapped ]
5555 public string ? SecondaryDoorColor => SecondaryDoor ? . Color ;
5656
5757 [ EagerLoad ]
Original file line number Diff line number Diff line change @@ -12,16 +12,16 @@ public sealed class Street : Identifiable<int>
1212 [ Attr ]
1313 public string Name { get ; set ; } = null ! ;
1414
15- [ NotMapped ]
1615 [ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
16+ [ NotMapped ]
1717 public int BuildingCount => Buildings . Count ;
1818
19- [ NotMapped ]
2019 [ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
20+ [ NotMapped ]
2121 public int DoorTotalCount => Buildings . Sum ( building => building . SecondaryDoor == null ? 1 : 2 ) ;
2222
23- [ NotMapped ]
2423 [ Attr ( Capabilities = AttrCapabilities . AllowView ) ]
24+ [ NotMapped ]
2525 public int WindowTotalCount => Buildings . Sum ( building => building . WindowCount ) ;
2626
2727 [ EagerLoad ]
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ public sealed class WorkItem : Identifiable<int>
1818 [ Attr ]
1919 public WorkItemPriority Priority { get ; set ; }
2020
21- [ NotMapped ]
2221 [ Attr ( Capabilities = AttrCapabilities . All & ~ ( AttrCapabilities . AllowCreate | AttrCapabilities . AllowChange ) ) ]
22+ [ NotMapped ]
2323 public bool IsImportant
2424 {
2525 get => Priority == WorkItemPriority . High ;
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ public sealed class WorkItemGroup : Identifiable<Guid>
1515 [ Attr ]
1616 public bool IsPublic { get ; set ; }
1717
18- [ NotMapped ]
1918 [ Attr ]
19+ [ NotMapped ]
2020 public bool IsDeprecated => ! string . IsNullOrEmpty ( Name ) && Name . StartsWith ( "DEPRECATED:" , StringComparison . OrdinalIgnoreCase ) ;
2121
2222 [ HasOne ]
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceInheritance.Models;
99[ Resource ( ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceInheritance" , GenerateControllerEndpoints = JsonApiEndpoints . None ) ]
1010public sealed class AlwaysMovingTandem : Bike
1111{
12- [ NotMapped ]
1312 [ Attr ]
13+ [ NotMapped ]
1414 public Guid LocationToken
1515 {
1616 get => Guid . NewGuid ( ) ;
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ public sealed class Game : Identifiable<int?>
1313 [ Attr ]
1414 public string Title { get ; set ; } = null ! ;
1515
16- [ NotMapped ]
1716 [ Attr ]
17+ [ NotMapped ]
1818 public Guid SessionToken => Guid . NewGuid ( ) ;
1919
2020 [ HasOne ]
You can’t perform that action at this time.
0 commit comments