コード例 #1
0
        public async Task <int> Add(ProposalModel model)
        {
            var entity = EntityModelAdapter.FromProposalModelToProposal(model);

            _dbContext.Proposals.Add(entity);
            return(await _dbContext.SaveChangesAsync());
        }
コード例 #2
0
        public async Task <int> Add(AttendeeModel attendee)
        {
            var entity = EntityModelAdapter.FromAttendeeModelToAttendee(attendee);

            _dbContext.Attendees.Add(entity);
            return(await _dbContext.SaveChangesAsync());
        }
コード例 #3
0
 public async Task <int> Add(ConferenceModel model)
 {
     try
     {
         var entity = EntityModelAdapter.FromConferenceModelToConference(model);
         _dbContext.Conferences.Add(entity);
         return(await _dbContext.SaveChangesAsync());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }