Ejemplo n.º 1
0
        public static AffiliateRepository InstantiateForMemory(RequestContext c)
        {
            AffiliateRepository result = null;

            result = new AffiliateRepository(c, new MemoryStrategy <Data.EF.bvc_Affiliate>(PrimaryKeyType.Long),
                                             new MemoryStrategy <Data.EF.bvc_UserXContact>(PrimaryKeyType.Long),
                                             new TextLogger());
            return(result);
        }
Ejemplo n.º 2
0
        public static AffiliateRepository InstantiateForDatabase(RequestContext c)
        {
            AffiliateRepository result = null;

            result = new AffiliateRepository(c,
                                             new EntityFrameworkRepository <Data.EF.bvc_Affiliate>(new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)),
                                             new EntityFrameworkRepository <Data.EF.bvc_UserXContact>(new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)),
                                             new SupressLogger());
            return(result);
        }
Ejemplo n.º 3
0
 public static ContactService InstantiateForDatabase(RequestContext c)
 {
     return(new ContactService(c,
                               AddressRepository.InstantiateForDatabase(c),
                               PriceGroupRepository.InstantiateForDatabase(c),
                               MailingListRepository.InstantiateForDatabase(c),
                               VendorRepository.InstantiateForDatabase(c),
                               ManufacturerRepository.InstantiateForDatabase(c),
                               AffiliateRepository.InstantiateForDatabase(c),
                               AffiliateReferralRepository.InstantiateForDatabase(c)));
 }
Ejemplo n.º 4
0
 public ContactService(RequestContext c,
                       AddressRepository addresses,
                       PriceGroupRepository pricegroups,
                       MailingListRepository mailingLists,
                       VendorRepository vendors,
                       ManufacturerRepository manufacturers,
                       AffiliateRepository affiliates,
                       AffiliateReferralRepository affiliateReferrals)
 {
     context                 = c;
     Addresses               = addresses;
     PriceGroups             = pricegroups;
     this.MailingLists       = mailingLists;
     this.Vendors            = vendors;
     this.Manufacturers      = manufacturers;
     this.Affiliates         = affiliates;
     this.AffiliateReferrals = affiliateReferrals;
 }