UWP: Creating Goal Tracker App Part 3

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ม.ค. 2025

ความคิดเห็น • 4

  • @rickyguan4930
    @rickyguan4930 7 ปีที่แล้ว

    If I am using C++/CX, there is no way to use Entity Framework as you did in the video, right?

    • @javrabbit
      @javrabbit  7 ปีที่แล้ว

      You are correct. From what i see entity framework is only available for use in managed projects. Maybe you can look into other alternatives for a C++ project. Check if ADO.NET works for C++

  • @agungbuana6796
    @agungbuana6796 8 ปีที่แล้ว

    I got a weird error: My db classes are pluralize somehow
    name: "Goals",
    columns: table => new
    {
    GoalId = table.Column(nullable: false)
    .Annotation("Sqlite:Autoincrement", true),
    Balance = table.Column(nullable: false),
    Date = table.Column(nullable: false),
    Name = table.Column(nullable: true),
    Notes = table.Column(nullable: true),
    SavingGoal = table.Column(nullable: false)
    },
    constraints: table =>
    {
    table.PrimaryKey("PK_Goals", x => x.GoalId);
    }); migrationBuilder.CreateTable(
    name: "Transactions",
    columns: table => new
    {
    Id = table.Column(nullable: false)
    .Annotation("Sqlite:Autoincrement", true),
    Amount = table.Column(nullable: false),
    Date = table.Column(nullable: false),
    GoalId = table.Column(nullable: false)
    },
    constraints: table =>
    {
    table.PrimaryKey("PK_Transactions", x => x.Id);
    table.ForeignKey(
    name: "FK_Transactions_Goals_GoalId",
    column: x => x.GoalId,
    principalTable: "Goals",
    principalColumn: "GoalId",
    onDelete: ReferentialAction.Cascade);
    }); migrationBuilder.CreateIndex(
    name: "IX_Transactions_GoalId",
    table: "Transactions",
    column: "GoalId");
    as such. when I run the program, table Goal and Transaction do not exist. Can you help?

    • @javrabbit
      @javrabbit  8 ปีที่แล้ว

      try checking out this link. I Hope it helps.
      stackoverflow.com/questions/12130059/how-turn-off-pluralize-table-creation-for-entity-framework-5