source/Repid.Core/DbSet/Basic/BasicFunctionDbSet.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// <autogenerated>
// This file was generated by T4 code generator Core.tt.
// Any changes made to this file manually will be lost next time the file is regenerated.
// </autogenerated>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using Repid.Entity.Basic;
namespace Repid.Core.DbSet.Basic
{
internal partial class BasicFunctionDbSet : OrderDbSet<BasicFunction>
{
internal List<BasicFunction> GetByMenuId(string menuId)
{
StringBuilder sql = new StringBuilder();
sql.AppendLine("SELECT F.ID");
sql.AppendLine(",F.InsertTime");
sql.AppendLine(",F.UpdateTime");
sql.AppendLine(",F.Sequence");
sql.AppendLine(",F.Name");
sql.AppendLine(",F.Icon");
sql.AppendLine(",F.Type");
sql.AppendLine(",F.Func");
sql.AppendLine(",F.Purview");
sql.AppendLine(",F.Remark");
sql.AppendLine("FROM Basic_Function AS F");
sql.AppendLine("INNER JOIN Basic_MenuFunction AS MF ON MF.FunctionID = F.ID");
sql.AppendLine("WHERE MF.MenuID = @MenuID");
sql.AppendLine("ORDER BY MF.Sequence ASC");
return dbContext.Dapper.Query<BasicFunction>(sql.ToString(), new { MenuID = menuId }).ToList();
}
internal List<BasicFunction> EffectiveAll(string menuId)
{
StringBuilder sql = new StringBuilder();
sql.AppendLine("SELECT F.ID");
sql.AppendLine(",F.InsertTime");
sql.AppendLine(",F.UpdateTime");
sql.AppendLine(",F.Sequence");
sql.AppendLine(",F.Name");
sql.AppendLine(",F.Icon");
sql.AppendLine(",F.Type");
sql.AppendLine(",F.Func");
sql.AppendLine(",F.Purview");
sql.AppendLine(",F.Remark");
sql.AppendLine("FROM Basic_Function AS F");
sql.AppendLine("INNER JOIN Basic_MenuFunction AS MF ON MF.FunctionID = F.ID");
sql.AppendLine("WHERE MF.MenuID = @MenuID");
sql.AppendLine("AND F.Type = 'FUNC'");
sql.AppendLine("ORDER BY MF.Sequence ASC");
return dbContext.Dapper.Query<BasicFunction>(sql.ToString(), new { MenuID = menuId }).ToList();
}
后面还有 31 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。