Beispiel #1
0
        public DepartmentsController()
        {
            this.department = new Department(new Models.RetailDBEntities());
            this.retailer   = new Retailer(new Models.RetailDBEntities());

            config = new MapperConfiguration(cfg => {
                cfg.CreateMap <Models.Retailer, RetailerDto>();
                // AutoMapper congig with nested type
                cfg.CreateMap <Models.Department, DepartmentDto>()
                .ForMember(dest => dest.Retailer, act => act.MapFrom(src => src.Retailer));
            });
            iMapper = config.CreateMapper();
        }
Beispiel #2
0
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            IRetailer retailer = (IRetailer)value;

            switch (retailer.Name)
            {
            case "Intermarche":
                return("ms-appx:///Images/intermarche.png");

            case "Carrefour":
                return("ms-appx:///Images/carrefour.png");

            default:
                break;
            }

            return(DependencyProperty.UnsetValue);
        }
 public ItemController(): base() {
     _retailer = new AmazonRetailer(AmazonAssociateTag, AmazonAccessKey, "AWSECommerceServicePort");
 }
Beispiel #4
0
 /// <summary>
 ///     Sets Interface instance for CRUD access
 /// </summary>
 /// <param name="location">IRetailer retailers</param>
 public RetailerController(IRetailer retailers)
 {
     _retailers = retailers;
 }
 public ItemController() : base()
 {
     _retailer = new AmazonRetailer(AmazonAssociateTag, AmazonAccessKey, "AWSECommerceServicePort");
 }
 public WishlistController()
     : base()
 {
     _db       = new WishlistContext();
     _retailer = new AmazonRetailer(AmazonAssociateTag, AmazonAccessKey, "AWSECommerceServicePort");
 }
 public RetailersController()
 {
     this.retailer   = new Retailer(new Models.RetailDBEntities());
     this.department = new Department(new Models.RetailDBEntities());
 }
 public WishlistController()
     : base() {
     _db = new WishlistContext();
     _retailer = new AmazonRetailer(AmazonAssociateTag, AmazonAccessKey, "AWSECommerceServicePort");
 }