public IEnumerable <Brand> GetBrandByType(MachineTypeEnum type) { return(_context.Brands.Where(b => b.Models.Any(m => m.MachineTypeId == type)).AsEnumerable()); }
public IEnumerable <Model> GetModelListByTypeAndBrand(MachineTypeEnum type, int brandId) { return(_context.Models.Where(x => x.BrandId == brandId && x.MachineTypeId == type).OrderBy(x => x.ModelName).AsEnumerable()); }