protected virtual async Task Update(CreateOrEditMenuDto input) { var menu = await _menuRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, menu); await _menuRepository.UpdateAsync(menu); }
public async Task CreateOrEdit(CreateOrEditMenuDto input) { if (input.Id == null || input.Id == 0) { await Create(input); } else { await Update(input); } }
protected virtual async Task Create(CreateOrEditMenuDto input) { var menu = ObjectMapper.Map <Menu>(input); if (AbpSession.TenantId != null) { //menu.TenantId = (int?)AbpSession.TenantId; } await _menuRepository.InsertAsync(menu); }
protected virtual async Task Create(CreateOrEditMenuDto input) { var menu = ObjectMapper.Map <Menu>(input); await _menuRepository.InsertAsync(menu); }