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