TekH e2853b64d1 refactor(repository): replace queryFactory with DbSetFactory in DbRepository
- Updated DbRepository constructor to use DbSetFactory<TDbContext, TEntity>
  instead of a Func<TDbContext, DbSet<TEntity>> queryFactory.
- Adjusted namespace imports to include DigitalData.Core.Infrastructure.Factory.
- Improved repository instantiation consistency and encapsulation.
2025-09-12 11:35:40 +02:00

17 lines
544 B
C#

using DigitalData.Core.Abstraction.Application.Repository;
using System.ComponentModel.DataAnnotations.Schema;
namespace DigitalData.Core.Tests.Mock;
[Table("USER")]
public class User : UserBase, IEntity
{
public required int Id { get; init; }
public override int GetHashCode() => HashCode.Combine(Id, FirstName, Email, Age);
public override bool Equals(object? obj)
=> (obj is User user && user.GetHashCode() == GetHashCode())
|| (obj is UserBase userBase && userBase.GetHashCode() == base.GetHashCode());
}