public async Task Publish([FromBody] VacancyDetailsUpdator.PublishReq req) { try { await this._updator.Publish(req, this._context); await this._context.SaveChangesAsync(); } catch (Exception e) { if (e is Domain.VacancyDetailsUpdator.VacancyIsNotPublishedException) { throw new VacancyIsNotPublishedException(e as VacancyDetailsUpdator.VacancyIsNotPublishedException); } throw e; } }
public async Task Delete([FromBody] VacancyDetailsUpdator.PublishReq req) { await this._updator.Delete(req, this._context); await this._context.SaveChangesAsync(); }