public async Task InsertAsync(CompanyDescriptionsDto dto) { var entity = _mapper.Map <CompanyDescriptions>(dto); await Repo.CompanyDescriptionsRepository.InsertAsync(entity); await Repo.SaveChangesAsync(); }
public async Task Put(int id, [FromBody] CompanyDescriptionsDto dto) { await _service.UpdateAsync(id, dto); }
public async Task Post([FromBody] CompanyDescriptionsDto dto) { await _service.InsertAsync(dto); }
public async Task UpdateAsync(int id, CompanyDescriptionsDto dto) { var entity = _mapper.Map <CompanyDescriptions>(dto); await Repo.CompanyDescriptionsRepository.UpdateAsync(id, entity); }