Пример #1
0
        public RoleSettingDto GetRolesetting(Guid id)
        {
            ExHelper.ThrowIf(id == Guid.Empty, "无效的查询参数");
            RoleSettingDto dto = Dbc.Db.GetById <RoleSettingDto>(id);

            return(dto);
        }
Пример #2
0
 private bool SetRolesetting(RoleSettingDto dto)
 {
     CheckRolesetting(dto);//检查用户输入
     if (dto.Id != Guid.Empty)
     {
         RoleSettingDto dbDto = Dbc.Db.GetById <RoleSettingDto>(dto.Id);
         ExHelper.ThrowIfNull(dbDto, "查找更新记录失败.");
         dbDto.CopyTo(dto, a => a.Id);
     }
     Dbc.Db.Set(dto);
     return(true);
 }
Пример #3
0
 /// <summary>
 /// 检查校验Save对象
 /// </summary>
 /// <param name="dto">Dto 对象</param>
 /// <returns></returns>
 private void CheckRolesetting(RoleSettingDto dto)
 {
 }
Пример #4
0
 /// <summary>
 /// 数据插入或更新
 /// </summary>
 /// <param name="dto"></param>
 /// <returns></returns>
 public RoleSettingDto InsertOrUpdate(RoleSettingDto dto)
 {
     return(_repository.InsertOrUpdate(dto));
 }