-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed custom enumeration type in Ordering service (#478)
* removed custom enumeration type * update CardTypeEntityTypeConfiguration.cs to require card type name * updataed Duende version * add Duende to list of suppressed assemblies due to current known issue with v7.0.6 * set NU3042 to NoWarn * revert nowarn change * update CartType to use required / init-only properties
- Loading branch information
1 parent
1c77175
commit 633dd1a
Showing
5 changed files
with
10 additions
and
96 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
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
21 changes: 4 additions & 17 deletions
21
src/Ordering.Domain/AggregatesModel/BuyerAggregate/CardType.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 |
---|---|---|
@@ -1,20 +1,7 @@ | ||
using eShop.Ordering.Domain.SeedWork; | ||
namespace eShop.Ordering.Domain.AggregatesModel.BuyerAggregate; | ||
|
||
namespace eShop.Ordering.Domain.AggregatesModel.BuyerAggregate; | ||
|
||
/// <remarks> | ||
/// Card type class should be marked as abstract with protected constructor to encapsulate known enum types | ||
/// this is currently not possible as OrderingContextSeed uses this constructor to load cardTypes from csv file | ||
/// </remarks> | ||
public class CardType | ||
: Enumeration | ||
public sealed class CardType | ||
{ | ||
public static CardType Amex = new(1, nameof(Amex)); | ||
public static CardType Visa = new(2, nameof(Visa)); | ||
public static CardType MasterCard = new(3, nameof(MasterCard)); | ||
|
||
public CardType(int id, string name) | ||
: base(id, name) | ||
{ | ||
} | ||
public int Id { get; init; } | ||
public required string Name { get; init; } | ||
} |
This file was deleted.
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