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.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
namespace DigitalData.Core.Tests.Infrastructure;
|
||||
|
||||
using DigitalData.Core.Tests.Mock;
|
||||
using DigitalData.Core.Tests.Mock;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
@@ -8,6 +6,8 @@ using System.Reflection;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Infrastructure;
|
||||
|
||||
namespace DigitalData.Core.Tests.Infrastructure;
|
||||
|
||||
public class DbRepositoryTests
|
||||
{
|
||||
private IHost _host;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
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; }
|
||||
|
||||
Reference in New Issue
Block a user