示例#1
0
        public virtual async Task UpdateUserAuthorizationAsync(UserAuthorizationEditDto input)
        {
            //TODO:更新前的逻辑判断,是否允许更新

            var entity = await _userAuthorizationRepository.GetAsync(input.Id.Value);

            input.MapTo(entity);

            await _userAuthorizationRepository.UpdateAsync(entity);
        }
示例#2
0
        public virtual async Task <UserAuthorizationEditDto> CreateUserAuthorizationAsync(UserAuthorizationEditDto input)
        {
            //TODO:新增前的逻辑判断,是否允许新增

            var entity = input.MapTo <UserAuthorization>();

            entity = await _userAuthorizationRepository.InsertAsync(entity);

            return(entity.MapTo <UserAuthorizationEditDto>());
        }