Exemple #1
0
        /// <summary>
        /// Обновить информацию по докладу.
        /// </summary>
        public async Task UpdateAsync(ReportInnerModel innerModel)
        {
            var report = _mapper.Map <Report>(innerModel);

            report.Path = String.Empty;

            _db.Update(report);
            await InsertCollaboratorsAsync(innerModel.Id, innerModel.Collaborators);
        }
Exemple #2
0
        /// <summary>
        /// Добавить доклад (основная информация).
        /// </summary>
        public async Task <Guid> InsertAsync(ReportInnerModel innerModel)
        {
            var report = _mapper.Map <Report>(innerModel);

            report.Id   = Guid.NewGuid();
            report.Path = String.Empty;

            await _db.InsertAsync(report);

            await InsertCollaboratorsAsync(report.Id, innerModel.Collaborators);

            return(report.Id);
        }