예제 #1
0
        protected virtual async Task Create(CreateOrEditLocationCredentialDto input)
        {
            var locationCredential = ObjectMapper.Map <LocationCredential>(input);



            await _locationCredentialRepository.InsertAsync(locationCredential);
        }
예제 #2
0
 public async Task CreateOrEdit(CreateOrEditLocationCredentialDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
예제 #3
0
        protected virtual async Task Update(CreateOrEditLocationCredentialDto input)
        {
            var locationCredential = await _locationCredentialRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, locationCredential);
        }