public async Task <SettingsRestrictedWordDto> UpdateRestrictedWord(long id, SettingsRestrictedWordDto dto) { var entity = await _settingsRestrictedWordManager.Find(id); if (entity == null) { return(null); } entity = await _settingsRestrictedWordManager.Update(_mapper.Map(dto, entity)); return(_mapper.Map <SettingsRestrictedWordDto>(entity)); }
public async Task <SettingsRestrictedWordDto> CreateRestrictedWord(SettingsRestrictedWordDto dto) { var entity = await _settingsRestrictedWordManager.Create(_mapper.Map <SettingsRestrictedWordEntity>(dto)); return(_mapper.Map <SettingsRestrictedWordDto>(entity)); }