-
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.
- Loading branch information
Showing
89 changed files
with
75,321 additions
and
0 deletions.
There are no files selected for viewing
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,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.11.35312.102 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCloset", "MyCloset\MyCloset.csproj", "{36A46A14-C1A6-4474-9868-59A935CFC546}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{36A46A14-C1A6-4474-9868-59A935CFC546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{36A46A14-C1A6-4474-9868-59A935CFC546}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{36A46A14-C1A6-4474-9868-59A935CFC546}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{36A46A14-C1A6-4474-9868-59A935CFC546}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {04DF7AD8-B378-406C-AED0-D1F62382F825} | ||
EndGlobalSection | ||
EndGlobal |
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,32 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using MyCloset.Models; | ||
using System.Diagnostics; | ||
|
||
namespace MyCloset.Controllers | ||
{ | ||
public class HomeController : Controller | ||
{ | ||
private readonly ILogger<HomeController> _logger; | ||
|
||
public HomeController(ILogger<HomeController> logger) | ||
{ | ||
_logger = logger; | ||
} | ||
|
||
public IActionResult Index() | ||
{ | ||
return View(); | ||
} | ||
|
||
public IActionResult Privacy() | ||
{ | ||
return View(); | ||
} | ||
|
||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] | ||
public IActionResult Error() | ||
{ | ||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); | ||
} | ||
} | ||
} |
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,28 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using MyCloset.Data; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace MyCloset.Controllers | ||
{ | ||
public class MyClosetController : Controller | ||
{ | ||
private readonly Context _context; | ||
|
||
// Database context | ||
public MyClosetController(Context context) | ||
{ | ||
_context = context; | ||
} | ||
|
||
// Retrieve all clothing items from the database | ||
// Use asynchronous action to retrieve data from the database | ||
public async Task<IActionResult> Closet() | ||
{ | ||
// Clothing Items database set | ||
var ClothingItems = await _context.ClothingItems.ToListAsync(); | ||
|
||
// Wait until we get data back before returning the view | ||
return View(ClothingItems); | ||
} | ||
} | ||
} |
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,16 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using MyCloset.Models; | ||
|
||
namespace MyCloset.Data | ||
{ | ||
public class Context : DbContext | ||
{ | ||
public Context() { } | ||
public Context(DbContextOptions<Context> options) | ||
: base(options) | ||
{ | ||
} | ||
|
||
public DbSet<ClothingItem> ClothingItems { get; set; } | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
MyCloset/Migrations/20250222031825_Initial Migration.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,37 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace MyCloset.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class InitialMigration : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "ClothingItem", | ||
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), | ||
Type = table.Column<string>(type: "nvarchar(max)", nullable: false), | ||
StackType = table.Column<int>(type: "int", nullable: false), | ||
ImageUrl = table.Column<string>(type: "nvarchar(max)", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_ClothingItem", x => x.Id); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "ClothingItem"); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,22 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace MyCloset.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class Error404 : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
|
||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
|
||
} | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
MyCloset/Migrations/20250225053753_Error Credential.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,44 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace MyCloset.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class ErrorCredential : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_ClothingItem", | ||
table: "ClothingItem"); | ||
|
||
migrationBuilder.RenameTable( | ||
name: "ClothingItem", | ||
newName: "ClothingItems"); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_ClothingItems", | ||
table: "ClothingItems", | ||
column: "Id"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_ClothingItems", | ||
table: "ClothingItems"); | ||
|
||
migrationBuilder.RenameTable( | ||
name: "ClothingItems", | ||
newName: "ClothingItem"); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_ClothingItem", | ||
table: "ClothingItem", | ||
column: "Id"); | ||
} | ||
} | ||
} |
Oops, something went wrong.