Skip to content

Commit

Permalink
feat : add baseId
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikoo-Asadnejad committed Jan 11, 2024
1 parent 25c37e2 commit 6a5ff79
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Src/Product.Domain/Shared/ValueObjects/BaseId.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Product.Domain.Base;

public class BaseId<T> : ValueObject
{
public T Id { get; }

public BaseId(T id)
{
Id = id;
}
protected override IEnumerable<object> GetEqualityComponents()
{
throw new NotImplementedException();
}
}
8 changes: 8 additions & 0 deletions Src/Product.Domain/Shared/ValueObjects/CategoryId.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Product.Domain.Base;

public class CategoryId : BaseId<int>
{
public CategoryId(int id) : base(id)
{
}
}
File renamed without changes.

0 comments on commit 6a5ff79

Please sign in to comment.