示例#1
0
        public override async Task <BaseEntity <Guid> > Edit()
        {
            var exhibit = await _exhibitRepository.Get(_exhibit.Id);

            IsOwner(exhibit);
            return(await _exhibitRepository.Update(_exhibit));
        }
示例#2
0
        public async Task AcceptRequestForExhibit(Guid notificationId)
        {
            var notify = await _notificationUseCases.Get(notificationId);

            var subdivision = await _subdivisionUseCases.Get(notify.SubdivisionId);

            var exhibit = await _exhibitRepository.Get(notify.ExhibitId);

            var record = new Record
            {
                Exhibit  = exhibit,
                Arrived  = exhibit.Subdivision,
                Departed = subdivision
            };
            await _recordRepository.AddRow(record);

            exhibit.Subdivision = subdivision;
            await _exhibitRepository.Update(exhibit);

            await SendRequestForExhibitNotify(notify, exhibit);
        }