-
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
18 changed files
with
302 additions
and
7 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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
# ASP.NET 3.1 project from TEDU | ||
# ASP.NET 3.1 project | ||
## Technologies | ||
### Entity Framework Core 3.1 | ||
#### ... | ||
- ASP.Net Core 3.1 | ||
- Entity Framework Core 3.1 | ||
## Install Entity Frameword Core 3.1 | ||
Package: | ||
- Microsoft.EntityFrameworkCore.SqlServer | ||
- Microsoft.EntityFrameworkCore.Design | ||
- Microsoft.EntityFrameworkCore.Tools | ||
## Youtube |
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,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class AppConfig | ||
{ | ||
public string Key { get; set; } | ||
public string Value { get; set; } | ||
} | ||
} |
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,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Cart | ||
{ | ||
public int Id { set; get; } | ||
public int ProductId { set; get; } | ||
public int Quantity { set; get; } | ||
public decimal Price { set; get; } | ||
|
||
public Guid UserId { get; set; } | ||
|
||
public Product Product { get; set; } | ||
|
||
public DateTime DateCreated { get; set; } | ||
} | ||
} |
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,20 @@ | ||
using eShopSolution.Data.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Category | ||
{ | ||
public int Id { set; get; } | ||
public int SortOrder { set; get; } | ||
public bool IsShowOnHome { set; get; } | ||
public int? ParentId { set; get; } | ||
public Status Status { set; get; } | ||
|
||
public List<ProductInCategory> ProductInCategories { get; set; } | ||
|
||
public List<CategoryTranslation> CategoryTranslations { get; set; } | ||
} | ||
} |
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,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class CategoryTranslation | ||
{ | ||
public int Id { set; get; } | ||
public int CategoryId { set; get; } | ||
public string Name { set; get; } | ||
public string SeoDescription { set; get; } | ||
public string SeoTitle { set; get; } | ||
public string LanguageId { set; get; } | ||
public string SeoAlias { set; get; } | ||
|
||
public Category Category { get; set; } | ||
|
||
public Language Language { get; set; } | ||
} | ||
} |
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,17 @@ | ||
using eShopSolution.Data.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Contact | ||
{ | ||
public int Id { set; get; } | ||
public string Name { set; get; } | ||
public string Email { set; get; } | ||
public string PhoneNumber { set; get; } | ||
public string Message { set; get; } | ||
public Status Status { set; get; } | ||
} | ||
} |
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,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Language | ||
{ | ||
public string Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public bool IsDefault { get; set; } | ||
|
||
public List<ProductTranslation> ProductTranslations { get; set; } | ||
|
||
public List<CategoryTranslation> CategoryTranslations { get; set; } | ||
} | ||
} |
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,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Order | ||
{ | ||
public int Id { set; get; } | ||
public DateTime OrderDate { set; get; } | ||
public Guid UserId { set; get; } | ||
public string ShipName { set; get; } | ||
public string ShipAddress { set; get; } | ||
public string ShipEmail { set; get; } | ||
public string ShipPhoneNumber { set; get; } | ||
public OrderStatus Status { set; get; } | ||
|
||
public List<OrderDetail> OrderDetails { get; set; } | ||
} | ||
} |
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,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class OrderDetail | ||
{ | ||
public int OrderId { set; get; } | ||
public int ProductId { set; get; } | ||
public int Quantity { set; get; } | ||
public decimal Price { set; get; } | ||
|
||
public Order Order { get; set; } | ||
|
||
public Product Product { get; set; } | ||
} | ||
} |
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,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public enum OrderStatus | ||
{ | ||
InProgress, | ||
Confirmed, | ||
Shipping, | ||
Success, | ||
Canceled | ||
} | ||
} |
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 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Product | ||
{ | ||
public int Id { set; get; } | ||
public decimal Price { set; get; } | ||
public decimal OriginalPrice { set; get; } | ||
public int Stock { set; get; } | ||
public int ViewCount { set; get; } | ||
public DateTime DateCreated { set; get; } | ||
public string SeoAlias { set; get; } | ||
|
||
public List<ProductInCategory> ProductInCategories { get; set; } | ||
|
||
public List<OrderDetail> OrderDetails { get; set; } | ||
|
||
public List<Cart> Carts { get; set; } | ||
|
||
public List<ProductTranslation> ProductTranslations { get; set; } | ||
} | ||
} |
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,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class ProductInCategory | ||
{ | ||
public int ProductId { get; set; } | ||
|
||
public Product Product { get; set; } | ||
|
||
public int CategoryId { get; set; } | ||
|
||
public Category Category { get; set; } | ||
} | ||
} |
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,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class ProductTranslation | ||
{ | ||
public int Id { set; get; } | ||
public int ProductId { set; get; } | ||
public string Name { set; get; } | ||
public string Description { set; get; } | ||
public string Details { set; get; } | ||
public string SeoDescription { set; get; } | ||
public string SeoTitle { set; get; } | ||
|
||
public string SeoAlias { get; set; } | ||
public string LanguageId { set; get; } | ||
|
||
public Product Product { get; set; } | ||
|
||
public Language Language { get; set; } | ||
} | ||
} |
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,21 @@ | ||
using eShopSolution.Data.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Promotion | ||
{ | ||
public int Id { set; get; } | ||
public DateTime FromDate { set; get; } | ||
public DateTime ToDate { set; get; } | ||
public bool ApplyForAll { set; get; } | ||
public int? DiscountPercent { set; get; } | ||
public decimal? DiscountAmount { set; get; } | ||
public string ProductIds { set; get; } | ||
public string ProductCategoryIds { set; get; } | ||
public Status Status { set; get; } | ||
public string Name { set; get; } | ||
} | ||
} |
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,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Transactions; | ||
|
||
namespace eShopSolution.Data.Entities | ||
{ | ||
public class Transaction | ||
{ | ||
public int Id { set; get; } | ||
public DateTime TransactionDate { set; get; } | ||
public string ExternalTransactionId { set; get; } | ||
public decimal Amount { set; get; } | ||
public decimal Fee { set; get; } | ||
public string Result { set; get; } | ||
public string Message { set; get; } | ||
public TransactionStatus Status { set; get; } | ||
public string Provider { set; get; } | ||
} | ||
} |
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,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Enums | ||
{ | ||
public enum Status | ||
{ | ||
InActive, | ||
Active | ||
} | ||
} |
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,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace eShopSolution.Data.Enums | ||
{ | ||
public enum TransactionStatus | ||
{ | ||
Success, | ||
Failed | ||
} | ||
} |
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