예제 #1
0
        /// <summary>
        /// Insert Organisation.
        /// </summary>
        /// <param name="who">Who Details.</param>
        /// <param name="model">Add view model.</param>
        /// <returns>Nothing.</returns>
        private async Task InsertRecordAsync(
            IWho who,
            AddViewModel model)
        {
            this.logger.ReportEntry(
                who,
                new { Model = model });

            IOrganisation organisation = model.ToDomain();

            await this.service
            .CreateOrganisationAsync(who, AuditEvent.OrganisationMaintenance, organisation)
            .ConfigureAwait(false);

            this.logger.ReportExit(who);
        }
예제 #2
0
        /// <summary>
        /// Insert Committee.
        /// </summary>
        /// <param name="who">Who Details.</param>
        /// <param name="model">Add view model.</param>
        /// <returns>Nothing.</returns>
        private async Task InsertRecordAsync(
            IWho who,
            AddViewModel model)
        {
            this.logger.ReportEntry(
                who,
                new { Model = model });

            IOrganisation organisation = await this.service.GetOrganisationByIdAsync(
                who,
                model.OrganisationId)
                                         .ConfigureAwait(false);

            ICommittee committee = model.ToDomain(organisation);

            await this.service
            .CreateCommitteeAsync(who, AuditEvent.CommitteeMaintenance, committee)
            .ConfigureAwait(false);

            this.logger.ReportExit(who);
        }
예제 #3
0
        /// <summary>
        /// Insert Meeting.
        /// </summary>
        /// <param name="who">Who Details.</param>
        /// <param name="model">Add view model.</param>
        /// <returns>Nothing.</returns>
        private async Task InsertRecordAsync(
            IWho who,
            AddViewModel model)
        {
            this.logger.ReportEntry(
                who,
                new { Model = model });

            ICommittee committee = await this.service.GetCommitteeByIdAsync(
                who : who,
                committeeId : model.CommitteeId)
                                   .ConfigureAwait(false);

            IMeeting meeting = model.ToDomain(
                committee: committee);

            await this.service
            .CreateMeetingAsync(who, AuditEvent.MeetingMaintenance, meeting)
            .ConfigureAwait(false);

            this.logger.ReportExit(who);
        }