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