| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<List<Vmo.PumpPropContent>> GetAll() |
| | | public async Task<List<Vmo.PumpPropContentVmo>> GetAll() |
| | | { |
| | | var DtoList = await _cal.GetAll(); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContent>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContentVmo>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpPropContentDto>, List<Vmo.PumpPropContent>>(DtoList); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpPropContentDto>, List<Vmo.PumpPropContentVmo>>(DtoList); |
| | | |
| | | return vmoList; |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<Vmo.PumpPropContent> GetByID(long ID) |
| | | public async Task<Vmo.PumpPropContentVmo> GetByID(long ID) |
| | | { |
| | | var Dto = await _cal.GetByID(ID); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContent>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContentVmo>() |
| | | ).CreateMapper(); |
| | | var vmo = mapper.Map<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContent>(Dto); |
| | | var vmo = mapper.Map<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContentVmo>(Dto); |
| | | |
| | | return vmo; |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<List<Vmo.PumpPropContent>> GetByIds(List<long> Ids) |
| | | public async Task<List<Vmo.PumpPropContentVmo>> GetByIds(List<long> Ids) |
| | | { |
| | | var DtoList = await _cal.GetByIds(Ids); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContent>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContentVmo>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpPropContentDto>, List<Vmo.PumpPropContent>>(DtoList); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpPropContentDto>, List<Vmo.PumpPropContentVmo>>(DtoList); |
| | | return vmoList; |
| | | } |
| | | |
| | | public async Task<List<Vmo.PumpPropContent>> GetByPumpPartID(long pumpPartId) |
| | | public async Task<List<Vmo.PumpPropContentVmo>> GetByPumpPartID(long pumpPartId) |
| | | { |
| | | var DtoList = await _cal.GetByPumpPartID(pumpPartId); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContent>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpPropContentDto, Vmo.PumpPropContentVmo>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpPropContentDto>, List<Vmo.PumpPropContent>>(DtoList); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpPropContentDto>, List<Vmo.PumpPropContentVmo>>(DtoList); |
| | | |
| | | return vmoList; |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<long> Insert(Vmo.PumpPropContent model) |
| | | public async Task<long> Insert(Vmo.PumpPropContentVmo model) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContent, AddPumpPropContentInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContentVmo, AddPumpPropContentInput>() |
| | | ).CreateMapper(); |
| | | var vmo = mapper.Map<Vmo.PumpPropContent, AddPumpPropContentInput>(model); |
| | | var vmo = mapper.Map<Vmo.PumpPropContentVmo, AddPumpPropContentInput>(model); |
| | | return await _cal.Insert(vmo); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Inserts(List<Vmo.PumpPropContent> list) |
| | | public async Task<bool> Inserts(List<Vmo.PumpPropContentVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContent, AddPumpPropContentInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContentVmo, AddPumpPropContentInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContent>, List<AddPumpPropContentInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContentVmo>, List<AddPumpPropContentInput>>(list); |
| | | |
| | | return await _cal.Inserts(vmoList); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> BulkInserts(List<Vmo.PumpPropContent> list) |
| | | public async Task<bool> BulkInserts(List<Vmo.PumpPropContentVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContent, AddPumpPropContentInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContentVmo, AddPumpPropContentInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContent>, List<AddPumpPropContentInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContentVmo>, List<AddPumpPropContentInput>>(list); |
| | | |
| | | return await _cal.BulkInserts(vmoList); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Update(Vmo.PumpPropContent model) |
| | | public async Task<bool> Update(Vmo.PumpPropContentVmo model) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContent, UpdatePumpPropContentInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContentVmo, UpdatePumpPropContentInput>() |
| | | ).CreateMapper(); |
| | | var Vmo = mapper.Map<Vmo.PumpPropContent, UpdatePumpPropContentInput>(model); |
| | | var Vmo = mapper.Map<Vmo.PumpPropContentVmo, UpdatePumpPropContentInput>(model); |
| | | |
| | | return await _cal.Update(Vmo); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Updates(List<Vmo.PumpPropContent> list) |
| | | public async Task<bool> Updates(List<Vmo.PumpPropContentVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContent, UpdatePumpPropContentInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContentVmo, UpdatePumpPropContentInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContent>, List<UpdatePumpPropContentInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContentVmo>, List<UpdatePumpPropContentInput>>(list); |
| | | |
| | | return await _cal.Updates(vmoList); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> BulkUpdates(List<Vmo.PumpPropContent> list) |
| | | public async Task<bool> BulkUpdates(List<Vmo.PumpPropContentVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContent, UpdatePumpPropContentInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpPropContentVmo, UpdatePumpPropContentInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContent>, List<UpdatePumpPropContentInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.PumpPropContentVmo>, List<UpdatePumpPropContentInput>>(list); |
| | | |
| | | return await _cal.BulkUpdates(vmoList); |
| | | } |