无法在Core 3.0 ASP.NET中运行ef命令

时间:2019-11-22 03:50:35

标签: entity-framework asp.net-core

    #FUNCTIONS
def help():
    print("list of commands\n"
          + "help = Display of commands\n"
          + "list = list of all the Latin I vocabulary\n"
          + "Quit = exits the main program to the exit credits and then exits the app\n")
def userInstructions(userInput):
    if (userInput == "help" or "Help"):
        help()
    elif(userInput == "list" or "List"):
        list()


    return input("\nEnter your responce: ")


def list():
    a = ["salve" , "vale" , "et" , "est" , "in" , "sunt" , "non" , "insula" , "sed" , "oppidum"
                , "quoque" , "canis" , "coquus" , "filia" , "filius" , "hortus" , "mater" , "pater" , "servus" , "via" , "amicus" , "ancilla" , "cena" , "cibus"
                , "intro" , "saluto" , "porto" , "video" , "dominus" , "laetus" , "mercator" , "audio" , "dico" , "unus" , "duo" , "tres" , "quattuor" , "quinque"
                , "sex" , "septem" , "octo" , "novem" , "decem" , "ad" , "ecce" , "magnus" , "parvus" , "ambulo" , "iratus" , "quis" , "quid" , "cur" , "ubi" ,
                "sum" , "es" , "eheu" , "pecunia" , "ego" , "tu" , "habeo" , "respondeo" , "venio" , "rideo" , "quod" , "ex" , "voco" , "clamo" , "specto" , "taberna"
                , "laboro" , "clamor" , "femina" , "vir", "puer" , "puella" , "multus" , "urbs" , "agricola" , "curro" , "hodie" , "iuvenis" , "meus" , "senex" , "sto" ,
                "optimus" , "volo" , "fortis" , "emo" , "pulso" , "bonus" , "malus" , "festino" , "per" , "pugno" , "scribo" , "tuus" , "erat" , "paro" , "cum" , "facio" ,
                "heri" , "ingens" , "nihil" , "omnis" , "vendo" , "navis" , "prope" , "rogo" , "terreo" , "inquit" , "tamen" , "eum" , "eam" , "duco" , "saepe" , "interficio" ,
                "habito" , "silva" , "statim" , "totus" , "pessimus"]

    print("List:")
    print('\n'.join(map(str, a)))

好吧,所以我尝试安装ef迁移工具并运行:

dotnet ef迁移添加InitialCreate

但是显然有问题。在全局范围内安装,是否不应该在PATH上创建引用?我需要做些什么才能使其正常工作?

1 个答案:

答案 0 :(得分:1)

我想您需要install EF tools使用:

dotnet tool install --global dotnet-ef