Example #1
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <QueuedEmail> builder)
        {
            builder.HasTableName(nameof(QueuedEmail));

            builder.Property(email => email.From).HasLength(500).IsNullable(false);
            builder.Property(email => email.FromName).HasLength(500);
            builder.Property(email => email.To).HasLength(500).IsNullable(false);
            builder.Property(email => email.ToName).HasLength(500);
            builder.Property(email => email.ReplyTo).HasLength(500);
            builder.Property(email => email.ReplyToName).HasLength(500);
            builder.Property(email => email.CC).HasLength(500);
            builder.Property(email => email.Bcc).HasLength(500);
            builder.Property(email => email.Subject).HasLength(1000);
            builder.Property(queuedemail => queuedemail.PriorityId);
            builder.Property(queuedemail => queuedemail.Body);
            builder.Property(queuedemail => queuedemail.AttachmentFilePath);
            builder.Property(queuedemail => queuedemail.AttachmentFileName);
            builder.Property(queuedemail => queuedemail.AttachedDownloadId);
            builder.Property(queuedemail => queuedemail.CreatedOnUtc);
            builder.Property(queuedemail => queuedemail.DontSendBeforeDateUtc);
            builder.Property(queuedemail => queuedemail.SentTries);
            builder.Property(queuedemail => queuedemail.SentOnUtc);
            builder.Property(queuedemail => queuedemail.EmailAccountId);

            builder.Ignore(email => email.Priority);
        }
Example #2
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <DiscountManufacturerMapping> builder)
        {
            builder.HasTableName(NopMappingDefaults.DiscountAppliedToManufacturersTable);
            builder.HasPrimaryKey(mapping => new { mapping.DiscountId, mapping.EntityId });

            builder.Property(mapping => mapping.DiscountId).HasColumnName("Discount_Id");
            builder.Property(mapping => mapping.EntityId).HasColumnName("Manufacturer_Id");

            builder.Ignore(mapping => mapping.Id);
        }
Example #3
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ForumTopic> builder)
        {
            builder.HasTableName(NopMappingDefaults.ForumsTopicTable);

            builder.Property(topic => topic.Subject).HasLength(450).IsNullable(false);
            builder.Property(forumtopic => forumtopic.ForumId);
            builder.Property(forumtopic => forumtopic.CustomerId);
            builder.Property(forumtopic => forumtopic.TopicTypeId);
            builder.Property(forumtopic => forumtopic.NumPosts);
            builder.Property(forumtopic => forumtopic.Views);
            builder.Property(forumtopic => forumtopic.LastPostId);
            builder.Property(forumtopic => forumtopic.LastPostCustomerId);
            builder.Property(forumtopic => forumtopic.LastPostTime);
            builder.Property(forumtopic => forumtopic.CreatedOnUtc);
            builder.Property(forumtopic => forumtopic.UpdatedOnUtc);

            builder.Ignore(topic => topic.ForumTopicType);
            builder.Ignore(topic => topic.NumReplies);
        }
Example #4
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <CustomerCustomerRoleMapping> builder)
        {
            builder.HasTableName(NopMappingDefaults.CustomerCustomerRoleTable);
            builder.HasPrimaryKey(mapping => new { mapping.CustomerId, mapping.CustomerRoleId });

            builder.Property(mapping => mapping.CustomerId).HasColumnName("Customer_Id");
            builder.Property(mapping => mapping.CustomerRoleId).HasColumnName("CustomerRole_Id");

            builder.Ignore(mapping => mapping.Id);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <VendorAttribute> builder)
        {
            builder.HasTableName(nameof(VendorAttribute));

            builder.Property(attribute => attribute.Name).HasLength(400).IsNullable(false);
            builder.Property(attribute => attribute.IsRequired);
            builder.Property(attribute => attribute.DisplayOrder);
            builder.Property(attribute => attribute.AttributeControlTypeId);

            builder.Ignore(attribute => attribute.AttributeControlType);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <CustomerPassword> builder)
        {
            builder.HasTableName(nameof(CustomerPassword));

            builder.Property(password => password.CustomerId);
            builder.Property(password => password.Password);
            builder.Property(password => password.PasswordFormatId);
            builder.Property(password => password.PasswordSalt);
            builder.Property(password => password.CreatedOnUtc);

            builder.Ignore(password => password.PasswordFormat);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <DiscountRequirement> builder)
        {
            builder.HasTableName(nameof(DiscountRequirement));

            builder.Property(requirement => requirement.DiscountId);
            builder.Property(requirement => requirement.DiscountRequirementRuleSystemName);
            builder.Property(requirement => requirement.ParentId);
            builder.Property(requirement => requirement.InteractionTypeId);
            builder.Property(requirement => requirement.IsGroup);

            builder.Ignore(requirement => requirement.InteractionType);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <MigrationVersionInfo> builder)
        {
            builder.HasTableName(nameof(MigrationVersionInfo));

            builder.Property(versionInfo => versionInfo.Version);
            builder.Property(versionInfo => versionInfo.Description);
            builder.Property(versionInfo => versionInfo.AppliedOn);

            builder.Ignore(versionInfo => versionInfo.Id);
            builder.Ignore(versionInfo => versionInfo.ApplicationContext);
            builder.Ignore(versionInfo => versionInfo.OwnsSchema);
            builder.Ignore(versionInfo => versionInfo.SchemaName);
            builder.Ignore(versionInfo => versionInfo.TableName);
            builder.Ignore(versionInfo => versionInfo.ColumnName);
            builder.Ignore(versionInfo => versionInfo.DescriptionColumnName);
            builder.Ignore(versionInfo => versionInfo.UniqueIndexName);
            builder.Ignore(versionInfo => versionInfo.AppliedOnColumnName);
        }
Example #9
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <GdprLog> builder)
        {
            builder.HasTableName(nameof(GdprLog));

            builder.Property(gdprlog => gdprlog.CustomerId);
            builder.Property(gdprlog => gdprlog.ConsentId);
            builder.Property(gdprlog => gdprlog.CustomerInfo);
            builder.Property(gdprlog => gdprlog.RequestTypeId);
            builder.Property(gdprlog => gdprlog.RequestDetails);
            builder.Property(gdprlog => gdprlog.CreatedOnUtc);

            builder.Ignore(gdpr => gdpr.RequestType);
        }
Example #10
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ProductProductTagMapping> builder)
        {
            builder.HasTableName(NopMappingDefaults.ProductProductTagTable);
            builder.HasPrimaryKey(mapping => new
            {
                mapping.ProductId,
                mapping.ProductTagId
            });

            builder.Property(mapping => mapping.ProductId).HasColumnName("Product_Id");
            builder.Property(mapping => mapping.ProductTagId).HasColumnName("ProductTag_Id");

            builder.Ignore(mapping => mapping.Id);
        }
Example #11
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ShippingMethodCountryMapping> builder)
        {
            builder.HasTableName(NopMappingDefaults.ShippingMethodRestrictionsTable);
            builder.HasPrimaryKey(mapping => new
            {
                mapping.ShippingMethodId,
                mapping.CountryId
            });

            builder.Property(mapping => mapping.ShippingMethodId).HasColumnName("ShippingMethod_Id");
            builder.Property(mapping => mapping.CountryId).HasColumnName("Country_Id");

            builder.Ignore(mapping => mapping.Id);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ProductSpecificationAttribute> builder)
        {
            builder.HasTableName(NopMappingDefaults.ProductSpecificationAttributeTable);

            builder.Property(productSpecificationAttribute => productSpecificationAttribute.CustomValue).HasLength(4000);
            builder.Property(productspecificationattribute => productspecificationattribute.ProductId);
            builder.Property(productspecificationattribute => productspecificationattribute.AttributeTypeId);
            builder.Property(productspecificationattribute => productspecificationattribute.SpecificationAttributeOptionId);
            builder.Property(productspecificationattribute => productspecificationattribute.AllowFiltering);
            builder.Property(productspecificationattribute => productspecificationattribute.ShowOnProductPage);
            builder.Property(productspecificationattribute => productspecificationattribute.DisplayOrder);

            builder.Ignore(productSpecificationAttribute => productSpecificationAttribute.AttributeType);
        }
Example #13
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <EmailAccount> builder)
        {
            builder.HasTableName(nameof(EmailAccount));

            builder.Property(emailAccount => emailAccount.DisplayName).HasLength(255);
            builder.Property(emailAccount => emailAccount.Email).HasLength(255).IsNullable(false);
            builder.Property(emailAccount => emailAccount.Host).HasLength(255).IsNullable(false);
            builder.Property(emailAccount => emailAccount.Username).HasLength(255).IsNullable(false);
            builder.Property(emailAccount => emailAccount.Password).HasLength(255).IsNullable(false);
            builder.Property(emailaccount => emailaccount.Port);
            builder.Property(emailaccount => emailaccount.EnableSsl);

            builder.Ignore(emailAccount => emailAccount.FriendlyName);
        }
Example #14
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <Log> builder)
        {
            builder.HasTableName(nameof(Log));

            builder.Property(logItem => logItem.ShortMessage).IsNullable(false);
            builder.Property(logItem => logItem.IpAddress).HasLength(200);
            builder.Property(logItem => logItem.LogLevelId);
            builder.Property(logItem => logItem.FullMessage);
            builder.Property(logItem => logItem.CustomerId);
            builder.Property(logItem => logItem.PageUrl);
            builder.Property(logItem => logItem.ReferrerUrl);
            builder.Property(logItem => logItem.CreatedOnUtc);

            builder.Ignore(logItem => logItem.LogLevel);
        }
Example #15
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <Discount> builder)
        {
            builder.HasTableName(nameof(Discount));

            builder.Property(discount => discount.Name).HasLength(200).IsNullable(false);
            builder.Property(discount => discount.CouponCode).HasLength(100);
            builder.Property(discount => discount.DiscountPercentage).HasDecimal();
            builder.Property(discount => discount.DiscountAmount).HasDecimal();
            builder.Property(discount => discount.MaximumDiscountAmount).HasDecimal();

            builder.Property(discount => discount.DiscountTypeId);
            builder.Property(discount => discount.UsePercentage);
            builder.Property(discount => discount.StartDateUtc);
            builder.Property(discount => discount.EndDateUtc);
            builder.Property(discount => discount.RequiresCouponCode);
            builder.Property(discount => discount.IsCumulative);
            builder.Property(discount => discount.DiscountLimitationId);
            builder.Property(discount => discount.LimitationTimes);
            builder.Property(discount => discount.MaximumDiscountedQuantity);
            builder.Property(discount => discount.AppliedToSubCategories);

            builder.Ignore(discount => discount.DiscountType);
            builder.Ignore(discount => discount.DiscountLimitation);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <RecurringPayment> builder)
        {
            builder.HasTableName(nameof(RecurringPayment));

            builder.Property(recurringPayment => recurringPayment.CycleLength);
            builder.Property(recurringPayment => recurringPayment.CyclePeriodId);
            builder.Property(recurringPayment => recurringPayment.TotalCycles);
            builder.Property(recurringPayment => recurringPayment.StartDateUtc);
            builder.Property(recurringPayment => recurringPayment.IsActive);
            builder.Property(recurringPayment => recurringPayment.LastPaymentFailed);
            builder.Property(recurringPayment => recurringPayment.Deleted);
            builder.Property(recurringPayment => recurringPayment.InitialOrderId);
            builder.Property(recurringPayment => recurringPayment.CreatedOnUtc);

            builder.Ignore(recurringPayment => recurringPayment.CyclePeriod);
        }
Example #17
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <MessageTemplate> builder)
        {
            builder.HasTableName(nameof(MessageTemplate));

            builder.Property(template => template.Name).HasLength(200).IsNullable(false);
            builder.Property(template => template.BccEmailAddresses).HasLength(200);
            builder.Property(template => template.Subject).HasLength(1000);
            builder.Property(template => template.EmailAccountId).IsNullable(false);
            builder.Property(template => template.Body);
            builder.Property(template => template.IsActive);
            builder.Property(template => template.DelayBeforeSend);
            builder.Property(template => template.DelayPeriodId);
            builder.Property(template => template.AttachedDownloadId);
            builder.Property(template => template.LimitedToStores);

            builder.Ignore(template => template.DelayPeriod);
        }
Example #18
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <Currency> builder)
        {
            builder.HasTableName(nameof(Currency));

            builder.Property(currency => currency.Name).HasLength(50).IsNullable(false);
            builder.Property(currency => currency.CurrencyCode).HasLength(5).IsNullable(false);
            builder.Property(currency => currency.DisplayLocale).HasLength(50);
            builder.Property(currency => currency.CustomFormatting).HasLength(50);
            builder.Property(currency => currency.Rate).HasDecimal();
            builder.Property(currency => currency.LimitedToStores);
            builder.Property(currency => currency.Published);
            builder.Property(currency => currency.DisplayOrder);
            builder.Property(currency => currency.CreatedOnUtc);
            builder.Property(currency => currency.UpdatedOnUtc);
            builder.Property(currency => currency.RoundingTypeId);

            builder.Ignore(currency => currency.RoundingType);
        }
Example #19
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ShoppingCartItem> builder)
        {
            builder.HasTableName(nameof(ShoppingCartItem));

            builder.Property(item => item.CustomerEnteredPrice).HasDecimal();

            builder.Property(item => item.StoreId);
            builder.Property(item => item.ShoppingCartTypeId);
            builder.Property(item => item.CustomerId);
            builder.Property(item => item.ProductId);
            builder.Property(item => item.AttributesXml);
            builder.Property(item => item.Quantity);
            builder.Property(item => item.RentalStartDateUtc);
            builder.Property(item => item.RentalEndDateUtc);
            builder.Property(item => item.CreatedOnUtc);
            builder.Property(item => item.UpdatedOnUtc);

            builder.Ignore(item => item.ShoppingCartType);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ProductAttributeMapping> builder)
        {
            builder.HasTableName(NopMappingDefaults.ProductProductAttributeTable);

            builder.Property(productattributemapping => productattributemapping.ProductId);
            builder.Property(productattributemapping => productattributemapping.ProductAttributeId);
            builder.Property(productattributemapping => productattributemapping.TextPrompt);
            builder.Property(productattributemapping => productattributemapping.IsRequired);
            builder.Property(productattributemapping => productattributemapping.AttributeControlTypeId);
            builder.Property(productattributemapping => productattributemapping.DisplayOrder);
            builder.Property(productattributemapping => productattributemapping.ValidationMinLength);
            builder.Property(productattributemapping => productattributemapping.ValidationMaxLength);
            builder.Property(productattributemapping => productattributemapping.ValidationFileAllowedExtensions);
            builder.Property(productattributemapping => productattributemapping.ValidationFileMaximumSize);
            builder.Property(productattributemapping => productattributemapping.DefaultValue);
            builder.Property(productattributemapping => productattributemapping.ConditionAttributeXml);

            builder.Ignore(pam => pam.AttributeControlType);
        }
Example #21
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ReturnRequest> builder)
        {
            builder.HasTableName(nameof(ReturnRequest));

            builder.Property(returnRequest => returnRequest.ReasonForReturn).IsNullable(false);
            builder.Property(returnRequest => returnRequest.RequestedAction).IsNullable(false);
            builder.Property(returnrequest => returnrequest.CustomNumber);
            builder.Property(returnrequest => returnrequest.StoreId);
            builder.Property(returnrequest => returnrequest.OrderItemId);
            builder.Property(returnrequest => returnrequest.CustomerId);
            builder.Property(returnrequest => returnrequest.Quantity);
            builder.Property(returnrequest => returnrequest.CustomerComments);
            builder.Property(returnrequest => returnrequest.UploadedFileId);
            builder.Property(returnrequest => returnrequest.StaffNotes);
            builder.Property(returnrequest => returnrequest.ReturnRequestStatusId);
            builder.Property(returnrequest => returnrequest.CreatedOnUtc);
            builder.Property(returnrequest => returnrequest.UpdatedOnUtc);

            builder.Ignore(returnRequest => returnRequest.ReturnRequestStatus);
        }
Example #22
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <GiftCard> builder)
        {
            builder.HasTableName(nameof(GiftCard));

            builder.Property(giftCard => giftCard.Amount).HasDecimal();

            builder.Property(giftCard => giftCard.PurchasedWithOrderItemId);
            builder.Property(giftCard => giftCard.GiftCardTypeId);
            builder.Property(giftCard => giftCard.IsGiftCardActivated);
            builder.Property(giftCard => giftCard.GiftCardCouponCode);
            builder.Property(giftCard => giftCard.RecipientName);
            builder.Property(giftCard => giftCard.RecipientEmail);
            builder.Property(giftCard => giftCard.SenderName);
            builder.Property(giftCard => giftCard.SenderEmail);
            builder.Property(giftCard => giftCard.Message);
            builder.Property(giftCard => giftCard.IsRecipientNotified);
            builder.Property(giftCard => giftCard.CreatedOnUtc);

            builder.Ignore(giftCard => giftCard.GiftCardType);
        }
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <CheckoutAttribute> builder)
        {
            builder.HasTableName(nameof(CheckoutAttribute));

            builder.Property(attribute => attribute.Name).HasLength(400).IsNullable(false);
            builder.Property(attribute => attribute.TextPrompt);
            builder.Property(attribute => attribute.IsRequired);
            builder.Property(attribute => attribute.ShippableProductRequired);
            builder.Property(attribute => attribute.IsTaxExempt);
            builder.Property(attribute => attribute.TaxCategoryId);
            builder.Property(attribute => attribute.AttributeControlTypeId);
            builder.Property(attribute => attribute.DisplayOrder);
            builder.Property(attribute => attribute.LimitedToStores);
            builder.Property(attribute => attribute.ValidationMinLength);
            builder.Property(attribute => attribute.ValidationMaxLength);
            builder.Property(attribute => attribute.ValidationFileAllowedExtensions);
            builder.Property(attribute => attribute.ValidationFileMaximumSize);
            builder.Property(attribute => attribute.DefaultValue);
            builder.Property(attribute => attribute.ConditionAttributeXml);

            builder.Ignore(attribute => attribute.AttributeControlType);
        }
Example #24
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <ProductAttributeValue> builder)
        {
            builder.HasTableName(nameof(ProductAttributeValue));

            builder.Property(value => value.Name).HasLength(400).IsNullable(false);
            builder.Property(value => value.ColorSquaresRgb).HasLength(100);
            builder.Property(value => value.PriceAdjustment).HasDecimal();
            builder.Property(value => value.WeightAdjustment).HasDecimal();
            builder.Property(value => value.Cost).HasDecimal();

            builder.Property(productattributevalue => productattributevalue.ProductAttributeMappingId);
            builder.Property(productattributevalue => productattributevalue.AttributeValueTypeId);
            builder.Property(productattributevalue => productattributevalue.AssociatedProductId);
            builder.Property(productattributevalue => productattributevalue.ImageSquaresPictureId);
            builder.Property(productattributevalue => productattributevalue.PriceAdjustmentUsePercentage);
            builder.Property(productattributevalue => productattributevalue.CustomerEntersQty);
            builder.Property(productattributevalue => productattributevalue.Quantity);
            builder.Property(productattributevalue => productattributevalue.IsPreSelected);
            builder.Property(productattributevalue => productattributevalue.DisplayOrder);
            builder.Property(productattributevalue => productattributevalue.PictureId);

            builder.Ignore(value => value.AttributeValueType);
        }
Example #25
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <Product> builder)
        {
            builder.HasTableName(nameof(Product));

            builder.Property(product => product.Name).HasLength(400).IsNullable(false);
            builder.Property(product => product.MetaKeywords).HasLength(400);
            builder.Property(product => product.MetaTitle).HasLength(400);
            builder.Property(product => product.Sku).HasLength(400);
            builder.Property(product => product.ManufacturerPartNumber).HasLength(400);
            builder.Property(product => product.Gtin).HasLength(400);
            builder.Property(product => product.AdditionalShippingCharge).HasDecimal();
            builder.Property(product => product.Price).HasDecimal();
            builder.Property(product => product.OldPrice).HasDecimal();
            builder.Property(product => product.ProductCost).HasDecimal();
            builder.Property(product => product.MinimumCustomerEnteredPrice).HasDecimal();
            builder.Property(product => product.MaximumCustomerEnteredPrice).HasDecimal();
            builder.Property(product => product.Weight).HasDecimal();
            builder.Property(product => product.Length).HasDecimal();
            builder.Property(product => product.Width).HasDecimal();
            builder.Property(product => product.Height).HasDecimal();
            builder.Property(product => product.RequiredProductIds).HasLength(1000);
            builder.Property(product => product.AllowedQuantities).HasLength(1000);
            builder.Property(product => product.BasepriceAmount).HasDecimal();
            builder.Property(product => product.BasepriceBaseAmount).HasDecimal();
            builder.Property(product => product.OverriddenGiftCardAmount).HasDecimal();
            builder.Property(product => product.ProductTypeId);
            builder.Property(product => product.ParentGroupedProductId);
            builder.Property(product => product.VisibleIndividually);
            builder.Property(product => product.ShortDescription);
            builder.Property(product => product.FullDescription);
            builder.Property(product => product.AdminComment);
            builder.Property(product => product.ProductTemplateId);
            builder.Property(product => product.VendorId);
            builder.Property(product => product.ShowOnHomepage);
            builder.Property(product => product.MetaDescription);
            builder.Property(product => product.AllowCustomerReviews);
            builder.Property(product => product.ApprovedRatingSum);
            builder.Property(product => product.NotApprovedRatingSum);
            builder.Property(product => product.ApprovedTotalReviews);
            builder.Property(product => product.NotApprovedTotalReviews);
            builder.Property(product => product.SubjectToAcl);
            builder.Property(product => product.LimitedToStores);
            builder.Property(product => product.IsGiftCard);
            builder.Property(product => product.GiftCardTypeId);
            builder.Property(product => product.RequireOtherProducts);
            builder.Property(product => product.AutomaticallyAddRequiredProducts);
            builder.Property(product => product.IsDownload);
            builder.Property(product => product.DownloadId);
            builder.Property(product => product.UnlimitedDownloads);
            builder.Property(product => product.MaxNumberOfDownloads);
            builder.Property(product => product.DownloadExpirationDays);
            builder.Property(product => product.DownloadActivationTypeId);
            builder.Property(product => product.HasSampleDownload);
            builder.Property(product => product.SampleDownloadId);
            builder.Property(product => product.HasUserAgreement);
            builder.Property(product => product.UserAgreementText);
            builder.Property(product => product.IsRecurring);
            builder.Property(product => product.RecurringCycleLength);
            builder.Property(product => product.RecurringCyclePeriodId);
            builder.Property(product => product.RecurringTotalCycles);
            builder.Property(product => product.IsRental);
            builder.Property(product => product.RentalPriceLength);
            builder.Property(product => product.RentalPricePeriodId);
            builder.Property(product => product.IsShipEnabled);
            builder.Property(product => product.IsFreeShipping);
            builder.Property(product => product.ShipSeparately);
            builder.Property(product => product.DeliveryDateId);
            builder.Property(product => product.IsTaxExempt);
            builder.Property(product => product.TaxCategoryId);
            builder.Property(product => product.IsTelecommunicationsOrBroadcastingOrElectronicServices);
            builder.Property(product => product.ManageInventoryMethodId);
            builder.Property(product => product.ProductAvailabilityRangeId);
            builder.Property(product => product.UseMultipleWarehouses);
            builder.Property(product => product.WarehouseId);
            builder.Property(product => product.StockQuantity);
            builder.Property(product => product.DisplayStockAvailability);
            builder.Property(product => product.DisplayStockQuantity);
            builder.Property(product => product.MinStockQuantity);
            builder.Property(product => product.LowStockActivityId);
            builder.Property(product => product.NotifyAdminForQuantityBelow);
            builder.Property(product => product.BackorderModeId);
            builder.Property(product => product.AllowBackInStockSubscriptions);
            builder.Property(product => product.OrderMinimumQuantity);
            builder.Property(product => product.OrderMaximumQuantity);
            builder.Property(product => product.AllowAddingOnlyExistingAttributeCombinations);
            builder.Property(product => product.NotReturnable);
            builder.Property(product => product.DisableBuyButton);
            builder.Property(product => product.DisableWishlistButton);
            builder.Property(product => product.AvailableForPreOrder);
            builder.Property(product => product.PreOrderAvailabilityStartDateTimeUtc);
            builder.Property(product => product.CallForPrice);
            builder.Property(product => product.CustomerEntersPrice);
            builder.Property(product => product.BasepriceEnabled);
            builder.Property(product => product.BasepriceUnitId);
            builder.Property(product => product.BasepriceBaseUnitId);
            builder.Property(product => product.MarkAsNew);
            builder.Property(product => product.MarkAsNewStartDateTimeUtc);
            builder.Property(product => product.MarkAsNewEndDateTimeUtc);
            builder.Property(product => product.HasTierPrices);
            builder.Property(product => product.HasDiscountsApplied);
            builder.Property(product => product.AvailableStartDateTimeUtc);
            builder.Property(product => product.AvailableEndDateTimeUtc);
            builder.Property(product => product.DisplayOrder);
            builder.Property(product => product.Published);
            builder.Property(product => product.Deleted);
            builder.Property(product => product.CreatedOnUtc);
            builder.Property(product => product.UpdatedOnUtc);

            builder.Ignore(product => product.ProductType);
            builder.Ignore(product => product.BackorderMode);
            builder.Ignore(product => product.DownloadActivationType);
            builder.Ignore(product => product.GiftCardType);
            builder.Ignore(product => product.LowStockActivity);
            builder.Ignore(product => product.ManageInventoryMethod);
            builder.Ignore(product => product.RecurringCyclePeriod);
            builder.Ignore(product => product.RentalPricePeriod);
        }
Example #26
0
        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityMappingBuilder <Order> builder)
        {
            builder.HasTableName(nameof(Order));

            builder.Property(order => order.CurrencyRate).HasDecimal();
            builder.Property(order => order.OrderSubtotalInclTax).HasDecimal();
            builder.Property(order => order.OrderSubtotalExclTax).HasDecimal();
            builder.Property(order => order.OrderSubTotalDiscountInclTax).HasDecimal();
            builder.Property(order => order.OrderSubTotalDiscountExclTax).HasDecimal();
            builder.Property(order => order.OrderShippingInclTax).HasDecimal();
            builder.Property(order => order.OrderShippingExclTax).HasDecimal();
            builder.Property(order => order.PaymentMethodAdditionalFeeInclTax).HasDecimal();
            builder.Property(order => order.PaymentMethodAdditionalFeeExclTax).HasDecimal();
            builder.Property(order => order.OrderTax).HasDecimal();
            builder.Property(order => order.OrderDiscount).HasDecimal();
            builder.Property(order => order.OrderTotal).HasDecimal();
            builder.Property(order => order.RefundedAmount).HasDecimal();
            builder.Property(order => order.CustomOrderNumber).IsNullable(false);
            builder.Property(order => order.OrderGuid);
            builder.Property(order => order.StoreId);
            builder.Property(order => order.CustomerId);
            builder.Property(order => order.BillingAddressId);
            builder.Property(order => order.ShippingAddressId);
            builder.Property(order => order.PickupAddressId);
            builder.Property(order => order.PickupInStore);
            builder.Property(order => order.OrderStatusId);
            builder.Property(order => order.ShippingStatusId);
            builder.Property(order => order.PaymentStatusId);
            builder.Property(order => order.PaymentMethodSystemName);
            builder.Property(order => order.CustomerCurrencyCode);
            builder.Property(order => order.CustomerTaxDisplayTypeId);
            builder.Property(order => order.VatNumber);
            builder.Property(order => order.TaxRates);
            builder.Property(order => order.RewardPointsHistoryEntryId);
            builder.Property(order => order.CheckoutAttributeDescription);
            builder.Property(order => order.CheckoutAttributesXml);
            builder.Property(order => order.CustomerLanguageId);
            builder.Property(order => order.AffiliateId);
            builder.Property(order => order.CustomerIp);
            builder.Property(order => order.AllowStoringCreditCardNumber);
            builder.Property(order => order.CardType);
            builder.Property(order => order.CardName);
            builder.Property(order => order.CardNumber);
            builder.Property(order => order.MaskedCreditCardNumber);
            builder.Property(order => order.CardCvv2);
            builder.Property(order => order.CardExpirationMonth);
            builder.Property(order => order.CardExpirationYear);
            builder.Property(order => order.AuthorizationTransactionId);
            builder.Property(order => order.AuthorizationTransactionCode);
            builder.Property(order => order.AuthorizationTransactionResult);
            builder.Property(order => order.CaptureTransactionId);
            builder.Property(order => order.CaptureTransactionResult);
            builder.Property(order => order.SubscriptionTransactionId);
            builder.Property(order => order.PaidDateUtc);
            builder.Property(order => order.ShippingMethod);
            builder.Property(order => order.ShippingRateComputationMethodSystemName);
            builder.Property(order => order.CustomValuesXml);
            builder.Property(order => order.Deleted);
            builder.Property(order => order.CreatedOnUtc);
            builder.Property(order => order.RedeemedRewardPointsEntryId);

            builder.Ignore(order => order.OrderStatus);
            builder.Ignore(order => order.PaymentStatus);
            builder.Ignore(order => order.ShippingStatus);
            builder.Ignore(order => order.CustomerTaxDisplayType);
        }