0
저장소 패턴을 사용하여 ASP.NET MVC에서 여러 테이블에서 데이터를 검색) { this.Products = new HashSet(); 은}엔티티 프레임 워크와 내 모델에 관련이 개 수업을
public int ProviderId { get; set; }
public string OfficialName { get; set; } // nome usado no licenciamento
public string PopularName { get; set; } // nome popular, mais conhecido
public int Nuit { get; set; } //identificacao tributaria
public EstablishmentCategory EstablishmentCategory { get; set; } // tipo de estabelecimento
public HalalState HalalState { get; set; }
public DateTime? LastUpdate { get; set; } // date e hora do registo
public ICollection<Product> Products { get; set; } // lista de produtos halal
}
나는 면도기 엔진을 사용하여 페이지에 표시하기 위해 제공 업체 이름과 함께 제품을로드하기 위해 노력하고있어. 뭔가 같은 :
Product Name (from table A) | Provider Name (from table B)
Soft drink | Coca-Cola
Chips | Lays
클래스 ProductsRepository
제품을 검색하는 방법 : Product
의 또 다른 속성과 함께 그것을 표시하기 위해,
public ICollection<Product> ReadAll()
{
return context.Products.ToList();
}
내가 Provider
클래스의 OfficialName
속성을 탐색 할 수있는 방법이 필요 보기에서.