| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | using AutoMapper;using Ropin.Inspection.Model.Entities;using Ropin.Inspection.Model.ViewModel;using Ropin.Inspection.Repository.Interface;using Ropin.Inspection.Service.Interface;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Ropin.Inspection.Service{    public class TispRecordImageService : ITispRecordImageService    {        private readonly ITispRecordImageRepository _repository;        private readonly IMapper _mapper;        public TispRecordImageService(ITispRecordImageRepository repository, IMapper mapper)        {            _repository = repository;            _mapper = mapper;        }        public async Task CreateOneAsync(TispRecordImageViewModel viewModel)        {            var recordImg = _mapper.Map<TISP_RecordImage>(viewModel);            await _repository.CreateOneAsync(recordImg);            var result = await _repository.SaveAsync();            if (!result)            {                throw new Exception("创建图片失败");            }        }        public Task DeleteAsync(Guid id)        {            throw new NotImplementedException();        }        public Task<TispRecordImageViewModel> GetByIdAsync(Guid id)        {            throw new NotImplementedException();        }        public Task<bool> IsExistAsync(Guid id)        {            throw new NotImplementedException();        }        public Task<int> UpdateOneAsync(TispRecordImageViewModel viewModel, params string[] fields)        {            throw new NotImplementedException();        }    }}
 |