重构代码:Group类重构优化性能

This commit is contained in:
Argo-Surface 2019-02-24 19:43:29 +08:00
parent 3e98f49070
commit f8a8644bad
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ namespace Bootstrap.DataAccess
public virtual IEnumerable<Group> RetrievesByRoleId(string roleId)
{
var db = DbManager.Create();
return DbManager.Create().Fetch<Group>($"select g.ID, g.GroupName, g.Description, case rg.GroupID when g.ID then 'checked' else '' end Checked from {db.Provider.EscapeSqlIdentifier("Groups")} g left join RoleGroup rg on g.ID = rg.GroupID and RoleID = @0", roleId);
return db.Fetch<Group>($"select g.ID, g.GroupName, g.Description, case rg.GroupID when g.ID then 'checked' else '' end Checked from {db.Provider.EscapeSqlIdentifier("Groups")} g left join RoleGroup rg on g.ID = rg.GroupID and RoleID = @0", roleId);
}
/// <summary>