public static string GetDisplayName(this BloodType bloodType) { return(bloodType.GetType() .GetMember(bloodType.ToString()) .First() .GetCustomAttribute <DisplayAttribute>() .GetName()); }
public override string ToString() { return($"Id: {Id}, Name: {Name}, NameKana: {NameKana ?? "NULL"}, NameRomaji: {NameRomaji ?? "NULL"}, " + $"Nickname: {Nickname ?? "NULL"}, Gender: ({Gender?.ToString() ?? "NULL"}), " + $"Birthdate: {Birthdate.ToString() ?? "NULL"}, BloodType: ({BloodType?.ToString() ?? "NULL"}), " + $"Height: {Height?.ToString() ?? "NULL"}, Hometown: {Hometown ?? "NULL"}, " + $"DebutYear: {DebutYear?.ToString() ?? "NULL"}, SpouseName: {SpouseName ?? "NULL"}, " + $"Agency: ({Agency?.ToString() ?? "NULL"}), PictureUrl: {PictureUrl ?? "NULL"}, " + $"IsFavorite: {IsFavorite}, IsCompleted: {IsCompleted}, CreatedAt: {CreatedAt}, UpdatedAt: {UpdatedAt}"); }
public string ToFormattedString() { string factor; if (RhesusFactor == RhesusFactor.POSITIVE) { factor = "+"; } else { factor = "-"; } return(BloodType.ToString() + factor); }
public override string ToString() { return(BloodType.ToString() + "," + RhesusFactor.ToString()); }