public virtual ActionResult Index(int id) { var model = new CategoryIndex(); using (var dbContext = new AllureContext()) { var current = dbContext.Set <SubCategory>().SingleOrDefault(c => c.Id == id); if (current == null) { throw new HttpException(404, string.Format("category {0} doesn't exist", id.ToString())); } model.Current = new SubCategoryOutput(current, this.LanguageCode); model.SubCategories = dbContext.Set <SubCategory>() .Include(c => c.Localized) .Where(c => c.ParentId == current.ParentId) .ToArray() .Select(c => new SubCategoryOutput(c, this.LanguageCode)) .ToArray(); model.Products = dbContext.Set <Product>() .Include(p => p.Locale) .Include(p => p.Localized) .Where(p => p.SubCategoryId == current.Id) .ToArray() .Select(p => new ProductOutput(p, this.LanguageCode)) .ToArray(); } return(View(CreateViewModel(model))); }
public Household(int id, CategoryIndex householdZone, Person[] persons, int vehicles) { ID = id; HouseholdZone = householdZone; _persons = persons; Vehicles = vehicles; }
/// <summary> /// Create a new person with the given attributes. /// </summary> /// <param name="age">The age of the person</param> /// <param name="female">True if they are female</param> /// <param name="dLic">True if they have a driver's license</param> /// <param name="employmentStatus">The index into the employment status categories that represents this person</param> /// <param name="occupation">The index into the occupation categories that represents this person</param> public Person(int age, bool female, bool dLic, int employmentStatus, int occupation) { Age = age; Female = female; DriversLicense = dLic; EmploymentStatus = employmentStatus; Occupation = occupation; }
public CategoryRoutingRow(int operationIndex, CategoryIndex left, in CategoryRoutingRow right)
public static void InvalidFinalCategory(CategoryIndex _interiorCategory) { Debug.Assert(false, $"Invalid final category {_interiorCategory}"); }
public bool Equals(DestinyVendorItemDefinition input) { if (input == null) { return(false); } return (( VendorItemIndex == input.VendorItemIndex || (VendorItemIndex.Equals(input.VendorItemIndex)) ) && ( ItemHash == input.ItemHash || (ItemHash.Equals(input.ItemHash)) ) && ( Quantity == input.Quantity || (Quantity.Equals(input.Quantity)) ) && ( FailureIndexes == input.FailureIndexes || (FailureIndexes != null && FailureIndexes.SequenceEqual(input.FailureIndexes)) ) && ( Currencies == input.Currencies || (Currencies != null && Currencies.SequenceEqual(input.Currencies)) ) && ( RefundPolicy == input.RefundPolicy || (RefundPolicy != null && RefundPolicy.Equals(input.RefundPolicy)) ) && ( RefundTimeLimit == input.RefundTimeLimit || (RefundTimeLimit.Equals(input.RefundTimeLimit)) ) && ( CreationLevels == input.CreationLevels || (CreationLevels != null && CreationLevels.SequenceEqual(input.CreationLevels)) ) && ( DisplayCategoryIndex == input.DisplayCategoryIndex || (DisplayCategoryIndex.Equals(input.DisplayCategoryIndex)) ) && ( CategoryIndex == input.CategoryIndex || (CategoryIndex.Equals(input.CategoryIndex)) ) && ( OriginalCategoryIndex == input.OriginalCategoryIndex || (OriginalCategoryIndex.Equals(input.OriginalCategoryIndex)) ) && ( MinimumLevel == input.MinimumLevel || (MinimumLevel.Equals(input.MinimumLevel)) ) && ( MaximumLevel == input.MaximumLevel || (MaximumLevel.Equals(input.MaximumLevel)) ) && ( Action == input.Action || (Action != null && Action.Equals(input.Action)) ) && ( DisplayCategory == input.DisplayCategory || (DisplayCategory != null && DisplayCategory.Equals(input.DisplayCategory)) ) && ( InventoryBucketHash == input.InventoryBucketHash || (InventoryBucketHash.Equals(input.InventoryBucketHash)) ) && ( VisibilityScope == input.VisibilityScope || (VisibilityScope != null && VisibilityScope.Equals(input.VisibilityScope)) ) && ( PurchasableScope == input.PurchasableScope || (PurchasableScope != null && PurchasableScope.Equals(input.PurchasableScope)) ) && ( Exclusivity == input.Exclusivity || (Exclusivity != null && Exclusivity.Equals(input.Exclusivity)) ) && ( IsOffer == input.IsOffer || (IsOffer != null && IsOffer.Equals(input.IsOffer)) ) && ( IsCrm == input.IsCrm || (IsCrm != null && IsCrm.Equals(input.IsCrm)) ) && ( SortValue == input.SortValue || (SortValue.Equals(input.SortValue)) ) && ( ExpirationTooltip == input.ExpirationTooltip || (ExpirationTooltip != null && ExpirationTooltip.Equals(input.ExpirationTooltip)) ) && ( RedirectToSaleIndexes == input.RedirectToSaleIndexes || (RedirectToSaleIndexes != null && RedirectToSaleIndexes.SequenceEqual(input.RedirectToSaleIndexes)) ) && ( SocketOverrides == input.SocketOverrides || (SocketOverrides != null && SocketOverrides.SequenceEqual(input.SocketOverrides)) ) && ( Unpurchasable == input.Unpurchasable || (Unpurchasable != null && Unpurchasable.Equals(input.Unpurchasable)) )); }
public bool Equals(DestinyVendorCategoryEntryDefinition input) { if (input == null) return false; return ( CategoryIndex == input.CategoryIndex || (CategoryIndex.Equals(input.CategoryIndex)) ) && ( SortValue == input.SortValue || (SortValue.Equals(input.SortValue)) ) && ( CategoryHash == input.CategoryHash || (CategoryHash.Equals(input.CategoryHash)) ) && ( QuantityAvailable == input.QuantityAvailable || (QuantityAvailable.Equals(input.QuantityAvailable)) ) && ( ShowUnavailableItems == input.ShowUnavailableItems || (ShowUnavailableItems != null && ShowUnavailableItems.Equals(input.ShowUnavailableItems)) ) && ( HideIfNoCurrency == input.HideIfNoCurrency || (HideIfNoCurrency != null && HideIfNoCurrency.Equals(input.HideIfNoCurrency)) ) && ( HideFromRegularPurchase == input.HideFromRegularPurchase || (HideFromRegularPurchase != null && HideFromRegularPurchase.Equals(input.HideFromRegularPurchase)) ) && ( BuyStringOverride == input.BuyStringOverride || (BuyStringOverride != null && BuyStringOverride.Equals(input.BuyStringOverride)) ) && ( DisabledDescription == input.DisabledDescription || (DisabledDescription != null && DisabledDescription.Equals(input.DisabledDescription)) ) && ( DisplayTitle == input.DisplayTitle || (DisplayTitle != null && DisplayTitle.Equals(input.DisplayTitle)) ) && ( Overlay == input.Overlay || (Overlay != null && Overlay.Equals(input.Overlay)) ) && ( VendorItemIndexes == input.VendorItemIndexes || (VendorItemIndexes != null && VendorItemIndexes.SequenceEqual(input.VendorItemIndexes)) ) && ( IsPreview == input.IsPreview || (IsPreview != null && IsPreview.Equals(input.IsPreview)) ) && ( IsDisplayOnly == input.IsDisplayOnly || (IsDisplayOnly != null && IsDisplayOnly.Equals(input.IsDisplayOnly)) ) && ( ResetIntervalMinutesOverride == input.ResetIntervalMinutesOverride || (ResetIntervalMinutesOverride.Equals(input.ResetIntervalMinutesOverride)) ) && ( ResetOffsetMinutesOverride == input.ResetOffsetMinutesOverride || (ResetOffsetMinutesOverride.Equals(input.ResetOffsetMinutesOverride)) ) ; }