Example #1
0
        public StandardEditDto GetStandardForEdit(NullableIdDto <long> input)
        {
            //Standard   standard
            var standardEditDto = new StandardEditDto();

            if (input.Id.HasValue) //Editing existing role?
            {
                Debug.Assert(input.Id != null, "修改时ID不得为空.");
                var standard = _standardRepository.Get(input.Id.Value);

                standardEditDto = standard.MapTo <StandardEditDto>();
            }

            return(standardEditDto);
        }
Example #2
0
 public async Task CreateOrUpdateStandard(StandardEditDto input)
 {
     BD_Standard item = input.MapTo <BD_Standard>();
     await _standardRepository.InsertOrUpdateAsync(item);
 }