緣起:
前陣子有站台的相關檔案排序出現了問題,我原本想說,這東西會不好解決,但後來同事有教我,可以用
ROW_NUMBER() 來重新設定排序。
自己回去弄懂了後,覺得這東西真好用,所以想寫一篇文章來記錄。
dotnet new webapp -n AspNetCoreDemo -o firstwebapp
internal class Program
{
class Performance
{
public int SN { get; set; }
public string Name { get; set; }
public Performance(int sN, string name)
{
SN = sN;
Name = name;
}
public override string ToString()
{
return $"SN:{SN}, Name:{Name}";
}
}
class Review
{
public int PerformanceSN { get; set; }
public string Name { get; set; }
public bool IsPass { get; set; }
public Review(int performanceSN, string name, bool isPass)
{
PerformanceSN = performanceSN;
Name = name;
IsPass = isPass;
}
public override string ToString()
{
return $"PerformanceSN:{PerformanceSN}, Name:{Name}, IsPass:{IsPass}";
}
}
}