Beispiel #1
0
        public async Task Unpublish([FromBody] ExpertProfileDetailsUpdator.PublishReq req)
        {
            try
            {
                await this._updator.Unpublish(req, this._context);

                await this._context.SaveChangesAsync();
            }
            catch (Exception e)
            {
                throw;
            }
        }
Beispiel #2
0
        public async Task Publish([FromBody] ExpertProfileDetailsUpdator.PublishReq req)
        {
            try
            {
                await this._updator.Publish(req, this._context);

                await this._context.SaveChangesAsync();
            }
            catch (Exception e)
            {
                if (e is Domain.ExpertProfileDetailsUpdator.ProfileIsNotPublishedException)
                {
                    throw new ProfileIsNotPublishedException(e as Domain.ExpertProfileDetailsUpdator.ProfileIsNotPublishedException);
                }

                throw;
            }
        }