public CampaignRegisterViewModel GetCampaign(Guid idCampaign, Guid idAccount) { var model = new CampaignRegisterViewModel(); if (idCampaign != Guid.Empty) { var campaign = _campaignDao.GetOne(idCampaign, idAccount); campaign.CampaignServices = _campaignServicesDao.GetCampaignServicesByCampaign(idCampaign, idAccount); foreach (var campaignService in campaign.CampaignServices) { campaignService.Service = _serviceDao.GetOne(campaignService.IdService, idAccount); } model = ConvertCampaign.ToCampaignRegisterViewModel(campaign, model); } return(model); }
public Service GetOne(Guid id, Guid idAccount) { return(_serviceDao.GetOne(id, idAccount)); }