25 lines
724 B
C#
25 lines
724 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using iPackage.Core.Web.Models.Entity;
|
|
using iPackage.Models.Entity;
|
|
using iPackage.Models.Service;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace iPackage.Core.Web.Repositories
|
|
{
|
|
public class RepositoryWrapper : IRepositoryWrapper, IScopedDependency
|
|
{
|
|
private readonly ApplicationIdentityContext _context;
|
|
public RepositoryWrapper(ApplicationIdentityContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
public IBaseRepository<T> SetRepository<T>() where T : ApiEntity
|
|
{
|
|
IBaseRepository<T> repository = new BaseRepository<T>(_context);
|
|
return repository;
|
|
}
|
|
}
|
|
}
|