qol: interpolated strings
This commit is contained in:
@@ -73,7 +73,7 @@ namespace Disco.Models.Repository
|
||||
public override string ToString()
|
||||
{
|
||||
if (DeviceModel != null)
|
||||
return string.Format("{0} - {1}", DeviceModel, SerialNumber);
|
||||
return $"{DeviceModel} - {SerialNumber}";
|
||||
else
|
||||
return SerialNumber;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Disco.Models.Repository
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Name))
|
||||
{
|
||||
return string.Format("{0}: {1}", Id, PurchaseDate.ToLongDateString());
|
||||
return $"{Id}: {PurchaseDate.ToLongDateString()}";
|
||||
}
|
||||
return Name;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Disco.Models.Repository
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
return string.Format("{0} ({1})", Name, ShortName);
|
||||
return $"{Name} ({ShortName})";
|
||||
}
|
||||
|
||||
[StringLength(200)]
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Disco.Models.Repository
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("User Flag Id: {0}; User Id: {1}; Added: {2:s}", UserFlagId, UserId, AddedDate);
|
||||
return $"User Flag Id: {UserFlagId}; User Id: {UserId}; Added: {AddedDate:s}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user