public async Task <int> Add(ProposalModel model) { var entity = EntityModelAdapter.FromProposalModelToProposal(model); _dbContext.Proposals.Add(entity); return(await _dbContext.SaveChangesAsync()); }
public async Task <int> Add(AttendeeModel attendee) { var entity = EntityModelAdapter.FromAttendeeModelToAttendee(attendee); _dbContext.Attendees.Add(entity); return(await _dbContext.SaveChangesAsync()); }
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; } }