完成模板模块,但配置类有问题
This commit is contained in:
@@ -19,6 +19,8 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions
|
||||
var db = app.ApplicationServices.GetRequiredService<ISqlSugarClient>();
|
||||
var options = app.ApplicationServices.GetRequiredService<IOptions<DbConnOptions>>();
|
||||
|
||||
//if (options.Value.EnabledCodeFirst == false) return;
|
||||
|
||||
var assemblys = new List<Assembly>();
|
||||
|
||||
//全盘加载
|
||||
|
||||
@@ -16,7 +16,7 @@ using Yi.Framework.Ddd.Repositories;
|
||||
namespace Yi.Framework.Core.Sqlsugar.Repositories
|
||||
{
|
||||
[AppService(ServiceType = typeof(IRepository<>))]
|
||||
public class SqlsugarRepository<T> : SimpleClient<T>, IRepository<T> where T : class, IEntity, new()
|
||||
public class SqlsugarRepository<T> : SimpleClient<T>, IRepository<T> where T : class, new()
|
||||
{
|
||||
public SqlsugarRepository(ISqlSugarClient context) : base(context)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Yi.Framework.Core.Sqlsugar
|
||||
|
||||
//这里替换过滤器实现
|
||||
services.AddScoped<IDataFilter, SqlsugarDataFilter>();
|
||||
var ss= Appsettings.appConfiguration("DbConnOptions", "EnabledCodeFirst");
|
||||
services.Configure<DbConnOptions>(Appsettings.appConfiguration("DbConnOptions"));
|
||||
services.AddSqlsugarServer();
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.Framework.Ddd.Repositories
|
||||
{
|
||||
public interface IRepository<T> where T : class, IEntity, new()
|
||||
public interface IRepository<T>
|
||||
{
|
||||
//单查
|
||||
Task<T> GetByIdAsync(dynamic id);
|
||||
|
||||
@@ -75,7 +75,7 @@ where TEntityDto : IEntityDto<TKey>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 全查
|
||||
/// 多查
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Ddd.Services.ReadOnlyAppService`5.GetListAsync(`4)">
|
||||
<summary>
|
||||
全查
|
||||
多查
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
|
||||
Reference in New Issue
Block a user