Example #1
0
 /// <summary>删除角色代码索引
 /// </summary>
 public void Delete(RoleCodeIndex index)
 {
     using (var connection = GetConnection())
     {
         connection.Delete(new
         {
             RoleId = index.RoleId
         }, ConfigSettings.RoleCodeIndexTable);
     }
 }
Example #2
0
 /// <summary>创建角色代码索引
 /// </summary>
 public void Add(RoleCodeIndex index)
 {
     using (var connection = GetConnection())
     {
         connection.Insert(new
         {
             RoleId = index.RoleId,
             Code   = index.Code
         }, ConfigSettings.RoleCodeIndexTable);
     }
 }