| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class PumpType |
| | | public class AssetsPumpType |
| | | { |
| | | private readonly HStation.CAL.IPumpType _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpType>(); |
| | | private readonly HStation.CAL.IAssetsPumpType _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsPumpType>(); |
| | | |
| | | #region Query |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<List<Vmo.PumpTypeVmo>> GetAll() |
| | | public async Task<List<Vmo.AssetsPumpTypeVmo>> GetAll() |
| | | { |
| | | var DtoList = await _cal.GetAll(); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpTypeDto>, List<Vmo.PumpTypeVmo>>(DtoList); |
| | | var vmoList = mapper.Map<List<Dto.Assets.AssetsPumpTypeDto>, List<Vmo.AssetsPumpTypeVmo>>(DtoList); |
| | | |
| | | return vmoList; |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<Vmo.PumpTypeVmo> GetByID(long ID) |
| | | public async Task<Vmo.AssetsPumpTypeVmo> GetByID(long ID) |
| | | { |
| | | var DtoList = await _cal.GetByID(ID); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>() |
| | | ).CreateMapper(); |
| | | var vmo = mapper.Map<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>(DtoList); |
| | | var vmo = mapper.Map<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>(DtoList); |
| | | return vmo; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<List<Vmo.PumpTypeVmo>> GetByIds(List<long> Ids) |
| | | public async Task<List<Vmo.AssetsPumpTypeVmo>> GetByIds(List<long> Ids) |
| | | { |
| | | var DtoList = await _cal.GetByIds(Ids); |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.PumpTypeDto, Vmo.PumpTypeVmo>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.AssetsPumpTypeDto, Vmo.AssetsPumpTypeVmo>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Dto.Assets.PumpTypeDto>, List<Vmo.PumpTypeVmo>>(DtoList); |
| | | var vmoList = mapper.Map<List<Dto.Assets.AssetsPumpTypeDto>, List<Vmo.AssetsPumpTypeVmo>>(DtoList); |
| | | return vmoList; |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<long> Insert(Vmo.PumpTypeVmo model) |
| | | public async Task<long> Insert(Vmo.AssetsPumpTypeVmo model) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, AddPumpTypeInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>() |
| | | ).CreateMapper(); |
| | | var vmo = mapper.Map<Vmo.PumpTypeVmo, AddPumpTypeInput>(model); |
| | | var vmo = mapper.Map<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>(model); |
| | | |
| | | return await _cal.Insert(vmo); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Inserts(List<Vmo.PumpTypeVmo> list) |
| | | public async Task<bool> Inserts(List<Vmo.AssetsPumpTypeVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, AddPumpTypeInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<AddPumpTypeInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<AddAssetsPumpTypeInput>>(list); |
| | | return await _cal.Inserts(vmoList); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> BulkInserts(List<Vmo.PumpTypeVmo> list) |
| | | public async Task<bool> BulkInserts(List<Vmo.AssetsPumpTypeVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, AddPumpTypeInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, AddAssetsPumpTypeInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<AddPumpTypeInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<AddAssetsPumpTypeInput>>(list); |
| | | |
| | | return await _cal.BulkInserts(vmoList); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Update(Vmo.PumpTypeVmo model) |
| | | public async Task<bool> Update(Vmo.AssetsPumpTypeVmo model) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, UpdatePumpTypeInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>() |
| | | ).CreateMapper(); |
| | | var vmo = mapper.Map<Vmo.PumpTypeVmo, UpdatePumpTypeInput>(model); |
| | | var vmo = mapper.Map<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>(model); |
| | | |
| | | return await _cal.Update(vmo); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> Updates(List<Vmo.PumpTypeVmo> list) |
| | | public async Task<bool> Updates(List<Vmo.AssetsPumpTypeVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, UpdatePumpTypeInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<UpdatePumpTypeInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<UpdateAssetsPumpTypeInput>>(list); |
| | | |
| | | return await _cal.Updates(vmoList); |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public async Task<bool> BulkUpdates(List<Vmo.PumpTypeVmo> list) |
| | | public async Task<bool> BulkUpdates(List<Vmo.AssetsPumpTypeVmo> list) |
| | | { |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.PumpTypeVmo, UpdatePumpTypeInput>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsPumpTypeVmo, UpdateAssetsPumpTypeInput>() |
| | | ).CreateMapper(); |
| | | var vmoList = mapper.Map<List<Vmo.PumpTypeVmo>, List<UpdatePumpTypeInput>>(list); |
| | | var vmoList = mapper.Map<List<Vmo.AssetsPumpTypeVmo>, List<UpdateAssetsPumpTypeInput>>(list); |
| | | |
| | | return await _cal.BulkUpdates(vmoList); |
| | | } |