mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-29 04:02:28 +00:00
Propose alternative to defining redundant class property
This commit is contained in:
parent
06f0d7a96f
commit
ac8e1dc303
1 changed files with 2 additions and 8 deletions
|
@ -52,12 +52,6 @@ namespace LBPUnion.ProjectLighthouse.Types.Levels
|
|||
[ForeignKey(nameof(CreatorId))]
|
||||
public User Creator { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string CreatorName
|
||||
{
|
||||
get => this.Creator?.Username;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The location of the level on the creator's earth
|
||||
/// </summary>
|
||||
|
@ -156,7 +150,7 @@ namespace LBPUnion.ProjectLighthouse.Types.Levels
|
|||
string slotData = LbpSerializer.StringElement("name", this.Name) +
|
||||
LbpSerializer.StringElement("id", this.SlotId) +
|
||||
LbpSerializer.StringElement("game", (int)this.GameVersion) +
|
||||
LbpSerializer.StringElement("npHandle", this.CreatorName) +
|
||||
LbpSerializer.StringElement("npHandle", this.Creator?.Username) +
|
||||
LbpSerializer.StringElement("description", this.Description) +
|
||||
LbpSerializer.StringElement("icon", this.IconHash) +
|
||||
LbpSerializer.StringElement("rootLevel", this.RootLevel) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue