/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <OrderItem> builder) { builder.HasTableName(nameof(OrderItem)); builder.Property(orderItem => orderItem.UnitPriceInclTax).HasDecimal(); builder.Property(orderItem => orderItem.UnitPriceExclTax).HasDecimal(); builder.Property(orderItem => orderItem.PriceInclTax).HasDecimal(); builder.Property(orderItem => orderItem.PriceExclTax).HasDecimal(); builder.Property(orderItem => orderItem.DiscountAmountInclTax).HasDecimal(); builder.Property(orderItem => orderItem.DiscountAmountExclTax).HasDecimal(); builder.Property(orderItem => orderItem.OriginalProductCost).HasDecimal(); builder.Property(orderItem => orderItem.ItemWeight).HasDecimal(); builder.Property(orderItem => orderItem.OrderItemGuid); builder.Property(orderItem => orderItem.OrderId); builder.Property(orderItem => orderItem.ProductId); builder.Property(orderItem => orderItem.Quantity); builder.Property(orderItem => orderItem.AttributeDescription); builder.Property(orderItem => orderItem.AttributesXml); builder.Property(orderItem => orderItem.DownloadCount); builder.Property(orderItem => orderItem.IsDownloadActivated); builder.Property(orderItem => orderItem.LicenseDownloadId); builder.Property(orderItem => orderItem.RentalStartDateUtc); builder.Property(orderItem => orderItem.RentalEndDateUtc); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <PictureBinary> builder) { builder.HasTableName(nameof(PictureBinary)); builder.Property(picturebinary => picturebinary.BinaryData); builder.Property(picturebinary => picturebinary.PictureId); }
public static void BuildIdentityUserRole <TKey>(this EntityMappingBuilder <IIdentityUserRole <TKey> > builder, string tableName = UserRoleTableName) where TKey : IEquatable <TKey> { builder.HasTableName(tableName); builder.HasPrimaryKey(r => new { r.UserId, r.RoleId }); builder.Association(x => x.User, k => k.UserId, other => other.Id, false); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <SpecificationAttribute> builder) { builder.HasTableName(nameof(SpecificationAttribute)); builder.Property(attribute => attribute.Name).IsNullable(false); builder.Property(attribute => attribute.DisplayOrder); }
public static void BuildIdentityRoleClaim <TKey>(this EntityMappingBuilder <IIdentityRoleClaim <TKey> > builder, string tableName = RoleClaimTableName) where TKey : IEquatable <TKey> { builder.HasTableName(tableName); builder.HasPrimaryKey(rc => rc.Id); builder.Association(x => x.Role, k => k.RoleId, other => other.Id, true); }
public static void BuildIdentityUserClaim <TKey>(this EntityMappingBuilder <IIdentityUserClaim <TKey> > builder, string tableName = UserClaimTableName) where TKey : IEquatable <TKey> { builder.HasTableName(tableName); builder.HasPrimaryKey(uc => uc.Id); builder.Association(x => x.User, k => k.UserId, other => other.Id, false); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ReturnRequestAction> builder) { builder.HasTableName(nameof(ReturnRequestAction)); builder.Property(action => action.Name).HasLength(400).IsNullable(false); builder.Property(action => action.DisplayOrder); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <CrossSellProduct> builder) { builder.HasTableName(nameof(CrossSellProduct)); builder.Property(crosssellproduct => crosssellproduct.ProductId1); builder.Property(crosssellproduct => crosssellproduct.ProductId2); }
/// <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); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <TaxCategory> builder) { builder.HasTableName(nameof(TaxCategory)); builder.Property(taxCategory => taxCategory.Name).HasLength(400).IsNullable(false); builder.Property(taxcategory => taxcategory.DisplayOrder); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <Category> builder) { builder.HasTableName(nameof(Category)); builder.Property(category => category.Name).HasLength(400).IsNullable(false); builder.Property(category => category.MetaKeywords).HasLength(400); builder.Property(category => category.MetaTitle).HasLength(400); builder.Property(category => category.PriceRanges).HasLength(400); builder.Property(category => category.PageSizeOptions).HasLength(200); builder.Property(category => category.Description); builder.Property(category => category.CategoryTemplateId); builder.Property(category => category.MetaDescription); builder.Property(category => category.ParentCategoryId); builder.Property(category => category.PictureId); builder.Property(category => category.PageSize); builder.Property(category => category.AllowCustomersToSelectPageSize); builder.Property(category => category.ShowOnHomepage); builder.Property(category => category.IncludeInTopMenu); builder.Property(category => category.SubjectToAcl); builder.Property(category => category.LimitedToStores); builder.Property(category => category.Published); builder.Property(category => category.Deleted); builder.Property(category => category.DisplayOrder); builder.Property(category => category.CreatedOnUtc); builder.Property(category => category.UpdatedOnUtc); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ProductAvailabilityRange> builder) { builder.HasTableName(nameof(ProductAvailabilityRange)); builder.Property(range => range.Name).HasLength(400).IsNullable(false); builder.Property(range => range.DisplayOrder); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <Customer> builder) { builder.HasTableName(nameof(Customer)); builder.Property(customer => customer.Username).HasLength(1000); builder.Property(customer => customer.Email).HasLength(1000); builder.Property(customer => customer.EmailToRevalidate).HasLength(1000); builder.Property(customer => customer.SystemName).HasLength(400); builder.Property(customer => customer.BillingAddressId).HasColumnName("BillingAddress_Id"); builder.Property(customer => customer.ShippingAddressId).HasColumnName("ShippingAddress_Id"); builder.Property(customer => customer.CustomerGuid); builder.Property(customer => customer.AdminComment); builder.Property(customer => customer.IsTaxExempt); builder.Property(customer => customer.AffiliateId); builder.Property(customer => customer.VendorId); builder.Property(customer => customer.HasShoppingCartItems); builder.Property(customer => customer.RequireReLogin); builder.Property(customer => customer.FailedLoginAttempts); builder.Property(customer => customer.CannotLoginUntilDateUtc); builder.Property(customer => customer.Active); builder.Property(customer => customer.Deleted); builder.Property(customer => customer.IsSystemAccount); builder.Property(customer => customer.LastIpAddress); builder.Property(customer => customer.CreatedOnUtc); builder.Property(customer => customer.LastLoginDateUtc); builder.Property(customer => customer.LastActivityDateUtc); builder.Property(customer => customer.RegisteredInStoreId); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <DeliveryDate> builder) { builder.HasTableName(nameof(DeliveryDate)); builder.Property(date => date.Name).HasLength(400).IsNullable(false); builder.Property(date => date.DisplayOrder); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ProductAttribute> builder) { builder.HasTableName(nameof(ProductAttribute)); builder.Property(attribute => attribute.Name).IsNullable(false); builder.Property(productattribute => productattribute.Description); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <Setting> builder) { builder.HasTableName(nameof(Setting)); builder.Property(setting => setting.Name).HasLength(200).IsNullable(false); builder.Property(setting => setting.Value).IsNullable(false); builder.Property(setting => setting.StoreId); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <AclRecord> builder) { builder.HasTableName(nameof(AclRecord)); builder.Property(record => record.EntityName).HasLength(400).IsNullable(false); builder.Property(aclrecord => aclrecord.EntityId); builder.Property(aclrecord => aclrecord.CustomerRoleId); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ActivityLogType> builder) { builder.HasTableName(nameof(ActivityLogType)); builder.Property(logType => logType.SystemKeyword).HasLength(100).IsNullable(false); builder.Property(logType => logType.Name).HasLength(200).IsNullable(false); builder.Property(activitylogtype => activitylogtype.Enabled); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ProductPicture> builder) { builder.HasTableName(NopMappingDefaults.ProductPictureTable); builder.Property(productpicture => productpicture.ProductId); builder.Property(productpicture => productpicture.PictureId); builder.Property(productpicture => productpicture.DisplayOrder); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ProductReviewReviewTypeMapping> builder) { builder.HasTableName(NopMappingDefaults.ProductReviewReviewTypeTable); builder.Property(prrt => prrt.ProductReviewId); builder.Property(prrt => prrt.ReviewTypeId); builder.Property(prrt => prrt.Rating); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <RecurringPaymentHistory> builder) { builder.HasTableName(nameof(RecurringPaymentHistory)); builder.Property(historyEntry => historyEntry.RecurringPaymentId); builder.Property(historyEntry => historyEntry.OrderId); builder.Property(historyEntry => historyEntry.CreatedOnUtc); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ManufacturerTemplate> builder) { builder.HasTableName(nameof(ManufacturerTemplate)); builder.Property(template => template.Name).HasLength(400).IsNullable(false); builder.Property(template => template.ViewPath).HasLength(400).IsNullable(false); builder.Property(manufacturertemplate => manufacturertemplate.DisplayOrder); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <VendorNote> builder) { builder.HasTableName(nameof(VendorNote)); builder.Property(note => note.Note).IsNullable(false); builder.Property(note => note.VendorId); builder.Property(note => note.CreatedOnUtc); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <PollVotingRecord> builder) { builder.HasTableName(nameof(PollVotingRecord)); builder.Property(pollvotingrecord => pollvotingrecord.PollAnswerId); builder.Property(pollvotingrecord => pollvotingrecord.CustomerId); builder.Property(pollvotingrecord => pollvotingrecord.CreatedOnUtc); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ProductReviewHelpfulness> builder) { builder.HasTableName(nameof(ProductReviewHelpfulness)); builder.Property(productReviewHelpfulness => productReviewHelpfulness.ProductReviewId); builder.Property(productReviewHelpfulness => productReviewHelpfulness.WasHelpful); builder.Property(productReviewHelpfulness => productReviewHelpfulness.CustomerId); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <PermissionRecord> builder) { builder.HasTableName(nameof(PermissionRecord)); builder.Property(record => record.Name).IsNullable(false); builder.Property(record => record.SystemName).HasLength(255).IsNullable(false); builder.Property(record => record.Category).HasLength(255).IsNullable(false); }
//private EntityMappingCollection EntityMappings => Model.EntityMappings; #endregion #region Public Methods /// <inheritdoc/> public void Entity <TEntity>(Action <IEntityMappingBuilder <TEntity> > action) where TEntity : class { var builder = new EntityMappingBuilder <TEntity>(Model); action(builder); AddEntityMapping(builder); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <DiscountUsageHistory> builder) { builder.HasTableName(nameof(DiscountUsageHistory)); builder.Property(historyEntry => historyEntry.DiscountId); builder.Property(historyEntry => historyEntry.OrderId); builder.Property(historyEntry => historyEntry.CreatedOnUtc); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <StoreMapping> builder) { builder.HasTableName(nameof(StoreMapping)); builder.Property(storeMapping => storeMapping.EntityName).HasLength(400).IsNullable(false); builder.Property(storemapping => storemapping.EntityId); builder.Property(storemapping => storemapping.StoreId); }
/// <summary> /// Configures the entity /// </summary> /// <param name="builder">The builder to be used to configure the entity</param> public override void Configure(EntityMappingBuilder <ShippingMethod> builder) { builder.HasTableName(nameof(ShippingMethod)); builder.Property(method => method.Name).HasLength(400).IsNullable(false); builder.Property(method => method.Description); builder.Property(method => method.DisplayOrder); }