我正在使用Scaffold-DBContext commnand以從我的數據庫創建模型。 我實施了Net Core Scaffold-DBContext CustomCandidateNamingService在版本2.0.0中不起作用-preview1
public class CustomCandidateNamingService : CandidateNamingService
{
public override string GenerateCandidateIdentifier(string original)
{
return original.ToUpper();
}
}
因爲我想返回屬性名全部大寫。 這適用於版本1.1.2,但不適用於版本2.0.0-preview1-final。
我必須改變一些東西嗎?
謝謝。
什麼是行不通的?錯誤?什麼都沒發生? AFAIK cadidatenamingservice也只能被EFCore代碼使用,而不是其他任何東西。所以他們改變了API。但一些錯誤文本將有所幫助。 –
嗨。我的意思是沒有執行GenerateCandidateIdentifier中的第th個代碼。我沒有錯誤。如果我使用2.0.0-preview1-final版本,生成的成員不是大寫字母。如果我使用1.1.2版本,生成的成員按預期大寫。 – skysurfer