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);
        }
        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);
        }
Exemplo 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)));
 }
Exemplo 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;
 }