feat:furion rbac搭建
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Yi.Framework.Infrastructure.Ddd.Repositories;
|
||||
|
||||
namespace Yi.Framework.Infrastructure.Uow
|
||||
{
|
||||
internal class DefaultUnitOfWork : IUnitOfWork
|
||||
{
|
||||
public DefaultUnitOfWork() { }
|
||||
public bool IsTran { get; set; }
|
||||
public bool IsCommit { get; set; }
|
||||
public bool IsClose { get; set; }
|
||||
|
||||
public bool Commit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public IRepository<T> GetRepository<T>()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Yi.Framework.Infrastructure.Uow
|
||||
{
|
||||
internal class DefaultUnitOfWorkManager : IUnitOfWorkManager
|
||||
{
|
||||
public IUnitOfWork CreateContext(bool isTran = true)
|
||||
{
|
||||
return new DefaultUnitOfWork();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Yi.Framework.Infrastructure.Ddd.Repositories;
|
||||
|
||||
namespace Yi.Framework.Infrastructure.Uow
|
||||
{
|
||||
public interface IUnitOfWork : IDisposable
|
||||
{
|
||||
bool IsTran { get; set; }
|
||||
bool IsCommit { get; set; }
|
||||
bool IsClose { get; set; }
|
||||
|
||||
IRepository<T> GetRepository<T>();
|
||||
bool Commit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Yi.Framework.Infrastructure.Uow
|
||||
{
|
||||
public interface IUnitOfWorkManager
|
||||
{
|
||||
IUnitOfWork CreateContext(bool isTran = true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user