Beispiel #1
0
 protected virtual async Task Create(CreateOrEditMenuPermissionDto input)
 {
     {
         var menu = ObjectMapper.Map <Menu_permission>(input);
         await _menupermissionRepository.InsertAsync(menu);
     }
 }
Beispiel #2
0
        protected virtual async Task Update(CreateOrEditMenuPermissionDto input)
        {
            var menu = await _menupermissionRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, menu);
            await _menupermissionRepository.UpdateAsync(menu);
        }
Beispiel #3
0
 public async Task CreateOrEdit(CreateOrEditMenuPermissionDto input)
 {
     if (input.Id == null || input.Id == 0)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }