Example #1
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.GenerationProvider == item))
                {
                    this._parent.GenerationProvider = null;
                    return(true);
                }
                if ((this._parent.TitleHeldBy_Marketer == item))
                {
                    this._parent.TitleHeldBy_Marketer = null;
                    return(true);
                }
                IEnergyTransaction energyTransactionItem = item.As <IEnergyTransaction>();

                if (((energyTransactionItem != null) &&
                     this._parent.EnergyTransactions.Remove(energyTransactionItem)))
                {
                    return(true);
                }
                IMarketer marketerItem = item.As <IMarketer>();

                if (((marketerItem != null) &&
                     this._parent.ResoldBy_Marketers.Remove(marketerItem)))
                {
                    return(true);
                }
                IServicePoint servicePointItem = item.As <IServicePoint>();

                if (((servicePointItem != null) &&
                     this._parent.ServicePoint.Remove(servicePointItem)))
                {
                    return(true);
                }
                return(false);
            }
 public Task <List <T> > GetOrganizations <T>(IMarketer marketer) where T : MarketerOrganizationOutput
 {
     return(Repository.Queryable()
            .Include(x => x.MarketingOrganization)
            .Where(x => x.MarketingOrganization != null && x.MarketingOrganization.Discoverable)
            .ProjectTo <T>(ProjectionMapping)
            .ToListAsync());
 }
Example #3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.Holds == null))
                {
                    IMarketer holdsCasted = item.As <IMarketer>();
                    if ((holdsCasted != null))
                    {
                        this._parent.Holds = holdsCasted;
                        return;
                    }
                }
                ITransmissionService reserves_TransmissionServiceCasted = item.As <ITransmissionService>();

                if ((reserves_TransmissionServiceCasted != null))
                {
                    this._parent.Reserves_TransmissionService.Add(reserves_TransmissionServiceCasted);
                }
                IAncillaryService reserves_AncillaryServicesCasted = item.As <IAncillaryService>();

                if ((reserves_AncillaryServicesCasted != null))
                {
                    this._parent.Reserves_AncillaryServices.Add(reserves_AncillaryServicesCasted);
                }
                if ((this._parent.Resells == null))
                {
                    IMarketer resellsCasted = item.As <IMarketer>();
                    if ((resellsCasted != null))
                    {
                        this._parent.Resells = resellsCasted;
                        return;
                    }
                }
                if ((this._parent.Sells == null))
                {
                    ITransmissionProvider sellsCasted = item.As <ITransmissionProvider>();
                    if ((sellsCasted != null))
                    {
                        this._parent.Sells = sellsCasted;
                        return;
                    }
                }
            }
Example #4
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.GenerationProvider == null))
                {
                    IGenerationProvider generationProviderCasted = item.As <IGenerationProvider>();
                    if ((generationProviderCasted != null))
                    {
                        this._parent.GenerationProvider = generationProviderCasted;
                        return;
                    }
                }
                if ((this._parent.TitleHeldBy_Marketer == null))
                {
                    IMarketer titleHeldBy_MarketerCasted = item.As <IMarketer>();
                    if ((titleHeldBy_MarketerCasted != null))
                    {
                        this._parent.TitleHeldBy_Marketer = titleHeldBy_MarketerCasted;
                        return;
                    }
                }
                IEnergyTransaction energyTransactionsCasted = item.As <IEnergyTransaction>();

                if ((energyTransactionsCasted != null))
                {
                    this._parent.EnergyTransactions.Add(energyTransactionsCasted);
                }
                IMarketer resoldBy_MarketersCasted = item.As <IMarketer>();

                if ((resoldBy_MarketersCasted != null))
                {
                    this._parent.ResoldBy_Marketers.Add(resoldBy_MarketersCasted);
                }
                IServicePoint servicePointCasted = item.As <IServicePoint>();

                if ((servicePointCasted != null))
                {
                    this._parent.ServicePoint.Add(servicePointCasted);
                }
            }
Example #5
0
 public AgencyController(IMarketer marketer,
                         IOrganizationService organizationService)
 {
     _marketer            = marketer;
     _organizationService = organizationService;
 }
 public MarketerController(IMarketer marketer, IMarketerService marketerService)
 {
     _marketerService = marketerService;
     _marketer        = marketer;
 }
 public Task <T> Update <T>(IMarketer principal, MarketerUpdateInput model)
     where T : MarketerOutput
 {
     throw new NotImplementedException();
 }