mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 14:04:41 +08:00
调整代码生成器
This commit is contained in:
parent
d222e8ba39
commit
3e72144f21
@ -19,9 +19,6 @@ namespace OpenAuth.App
|
|||||||
{
|
{
|
||||||
public BaseIntAutoGenApp(IUnitWork<TDbContext> unitWork, IRepository<T,TDbContext> repository, IAuth auth) : base(unitWork, repository, auth)
|
public BaseIntAutoGenApp(IUnitWork<TDbContext> unitWork, IRepository<T,TDbContext> repository, IAuth auth) : base(unitWork, repository, auth)
|
||||||
{
|
{
|
||||||
UnitWork = unitWork;
|
|
||||||
Repository = repository;
|
|
||||||
_auth = auth;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,24 +16,10 @@ namespace OpenAuth.App
|
|||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
public class BaseLongApp<T, TDbContext> :BaseApp<T,TDbContext> where T : LongEntity where TDbContext: DbContext
|
public class BaseLongApp<T, TDbContext> :BaseApp<T,TDbContext> where T : LongEntity where TDbContext: DbContext
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 用于普通的数据库操作
|
|
||||||
/// </summary>
|
|
||||||
protected IRepository<T, TDbContext> Repository;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用于事务操作
|
|
||||||
/// <para>使用详见:http://doc.openauth.me/core/unitwork.html</para>
|
|
||||||
/// </summary>
|
|
||||||
protected IUnitWork<TDbContext> UnitWork;
|
|
||||||
|
|
||||||
protected IAuth _auth;
|
|
||||||
|
|
||||||
public BaseLongApp(IUnitWork<TDbContext> unitWork, IRepository<T,TDbContext> repository, IAuth auth) : base(unitWork, repository,auth)
|
public BaseLongApp(IUnitWork<TDbContext> unitWork, IRepository<T,TDbContext> repository, IAuth auth) : base(unitWork, repository,auth)
|
||||||
{
|
{
|
||||||
UnitWork = unitWork;
|
|
||||||
Repository = repository;
|
|
||||||
_auth = auth;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,24 +16,9 @@ namespace OpenAuth.App
|
|||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
public class BaseStringApp<T, TDbContext> :BaseApp<T,TDbContext> where T : StringEntity where TDbContext: DbContext
|
public class BaseStringApp<T, TDbContext> :BaseApp<T,TDbContext> where T : StringEntity where TDbContext: DbContext
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 用于普通的数据库操作
|
|
||||||
/// </summary>
|
|
||||||
protected IRepository<T, TDbContext> Repository;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用于事务操作
|
|
||||||
/// <para>使用详见:http://doc.openauth.me/core/unitwork.html</para>
|
|
||||||
/// </summary>
|
|
||||||
protected IUnitWork<TDbContext> UnitWork;
|
|
||||||
|
|
||||||
protected IAuth _auth;
|
|
||||||
|
|
||||||
public BaseStringApp(IUnitWork<TDbContext> unitWork, IRepository<T,TDbContext> repository, IAuth auth) : base(unitWork, repository, auth)
|
public BaseStringApp(IUnitWork<TDbContext> unitWork, IRepository<T,TDbContext> repository, IAuth auth) : base(unitWork, repository, auth)
|
||||||
{
|
{
|
||||||
UnitWork = unitWork;
|
|
||||||
Repository = repository;
|
|
||||||
_auth = auth;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -12,7 +12,7 @@ using OpenAuth.Repository.Interface;
|
|||||||
|
|
||||||
namespace OpenAuth.App
|
namespace OpenAuth.App
|
||||||
{
|
{
|
||||||
public class {ModuleCode} : BaseApp<{ClassName},OpenAuthDBContext>
|
public class {ModuleCode} : BaseStringApp<{ClassName},OpenAuthDBContext>
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -13,7 +13,7 @@ using OpenAuth.Repository.Core;
|
|||||||
namespace OpenAuth.Repository.Domain
|
namespace OpenAuth.Repository.Domain
|
||||||
{
|
{
|
||||||
{AttributeManager}
|
{AttributeManager}
|
||||||
public class {ClassName} : Entity
|
public class {ClassName} : StringEntity
|
||||||
{
|
{
|
||||||
public {ClassName}()
|
public {ClassName}()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user