Ejemplo n.º 1
0
        protected virtual async Task Create(CreateOrEditLocationMachineDto input)
        {
            var locationMachine = ObjectMapper.Map <LocationMachine>(input);



            await _locationMachineRepository.InsertAsync(locationMachine);
        }
Ejemplo n.º 2
0
 public async Task CreateOrEdit(CreateOrEditLocationMachineDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Ejemplo n.º 3
0
        protected virtual async Task Update(CreateOrEditLocationMachineDto input)
        {
            var locationMachine = await _locationMachineRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, locationMachine);
        }