public void Create(CreateServiceSolicitationMessage message) { var serviceSolicitation = new ServiceSolicitation(); serviceSolicitation.Location = _locationRepository.Get(message.LocationId); serviceSolicitation.Advertiser = _advertiserRepository.Get(message.AdvertiserId); serviceSolicitation.EndDate = message.EndDate; serviceSolicitation.ContractModel = _contractModelRepository.Get(message.ContractModelId); serviceSolicitation.MonthlyValue = serviceSolicitation.Location.MonthlyValue; serviceSolicitation.StartDate = message.StartDate; _serviceSolicitationRepository.Add(serviceSolicitation); _serviceSolicitationRepository.SaveChanges(); }
public void Create(CreateServiceSolicitationMessage message) { var serviceSolicitation = new ServiceSolicitation(); serviceSolicitation.Location = _locationRepository.Get(message.LocationId); serviceSolicitation.Advertiser = _advertiserRepository.Get(message.AdvertiserId); serviceSolicitation.EndDate = message.EndDate; serviceSolicitation.ContractModel = _contractModelRepository.Get(message.ContractModelId); serviceSolicitation.MonthlyValue = serviceSolicitation.Location.MonthlyValue; serviceSolicitation.StartDate = message.StartDate; _serviceSolicitationRepository.Add(serviceSolicitation); _serviceSolicitationRepository.SaveChanges(); }
public void Remove(ServiceSolicitation solicitation) { _context.ServiceSolicitations.Remove(solicitation); }
public void Add(ServiceSolicitation solicitation) { _context.ServiceSolicitations.Add(solicitation); }