ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
If I am using C++/CX, there is no way to use Entity Framework as you did in the video, right?
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++
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?
try checking out this link. I Hope it helps.stackoverflow.com/questions/12130059/how-turn-off-pluralize-table-creation-for-entity-framework-5
If I am using C++/CX, there is no way to use Entity Framework as you did in the video, right?
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++
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?
try checking out this link. I Hope it helps.
stackoverflow.com/questions/12130059/how-turn-off-pluralize-table-creation-for-entity-framework-5