/// <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); }
/// <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); }