-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from abdulrahmannadap/New-Update
New update
- Loading branch information
Showing
34 changed files
with
1,238 additions
and
1,292 deletions.
There are no files selected for viewing
46 changes: 0 additions & 46 deletions
46
FCommerce.DataAcsess/Migrations/20240211153104_InitialCreate.Designer.cs
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
FCommerce.DataAcsess/Migrations/20240211153104_InitialCreate.cs
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
FCommerce.DataAcsess/Migrations/20240212102154_AddColumeIsActiveInCategory.Designer.cs
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
FCommerce.DataAcsess/Migrations/20240214093034_AddProductModel.cs
This file was deleted.
Oops, something went wrong.
26 changes: 18 additions & 8 deletions
26
...0240214093034_AddProductModel.Designer.cs → .../20240304122601_InitialCreate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
FCommerce.DataAcsess/Migrations/20240304122601_InitialCreate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace FCommerce.DataAcsess.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class InitialCreate : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Categories", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "int", nullable: false) | ||
.Annotation("SqlServer:Identity", "1, 1"), | ||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Categories", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Products", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "int", nullable: false) | ||
.Annotation("SqlServer:Identity", "1, 1"), | ||
ProductName = table.Column<string>(type: "nvarchar(max)", nullable: false), | ||
Description = table.Column<string>(type: "nvarchar(max)", nullable: false), | ||
ProductPrice = table.Column<double>(type: "float", nullable: false), | ||
CategoryId = table.Column<int>(type: "int", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Products", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_Products_Categories_CategoryId", | ||
column: x => x.CategoryId, | ||
principalTable: "Categories", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Products_CategoryId", | ||
table: "Products", | ||
column: "CategoryId"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Products"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Categories"); | ||
} | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
FCommerce.DataAcsess/Migrations/20240306095803_AddImageUrlInProduct.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.