Esempio n. 1
0
 public async Task <Fornecedor> ObterFornecedorProdutosEndereco(Guid id)
 {
     System.Linq.IQueryable <Fornecedor> queryable = Db.Fornecedores.AsNoTracking();
     return(await queryable
            .Include(c => c.Produtos)
            .Include(c => c.Endereco)
            .FirstOrDefaultAsync(c => c.Id == id));
 }
Esempio n. 2
0
 protected override System.Linq.IQueryable <BugsBox.Pharmacy.Models.MedicalCategoryDetail> IncludeNavigationProperties(System.Linq.IQueryable <BugsBox.Pharmacy.Models.MedicalCategoryDetail> queryable)
 {
     try
     {
         return(base.IncludeNavigationProperties(queryable
                                                 .Include(t => t.MedicalCategory)
                                                 ));
     }
     catch (Exception ex)
     {
         ex = new BusinessException(string.Format("[{0}]导航属性处理出错", EntityName), ex);
         return(HandleException <IQueryable <MedicalCategoryDetail> >(ex.Message, ex));
     }
 }
Esempio n. 3
0
 protected override System.Linq.IQueryable <BugsBox.Pharmacy.Models.GSPLicense> IncludeNavigationProperties(System.Linq.IQueryable <BugsBox.Pharmacy.Models.GSPLicense> queryable)
 {
     try
     {
         return(base.IncludeNavigationProperties(queryable
                                                 .Include(l => l.GMSPLicenseBusinessScopes)
                                                 ));
     }
     catch (Exception ex)
     {
         ex = new BusinessException(string.Format("[{0}]导航属性处理出错", EntityName), ex);
         return(HandleException <IQueryable <GSPLicense> >(ex.Message, ex));
     }
 }
Esempio n. 4
0
 protected override System.Linq.IQueryable <BugsBox.Pharmacy.Models.Employee> IncludeNavigationProperties(System.Linq.IQueryable <BugsBox.Pharmacy.Models.Employee> queryable)
 {
     try
     {
         return(base.IncludeNavigationProperties(queryable
                                                 .Include(e => e.Users)
                                                 .Include(e => e.Department)
                                                 ));
     }
     catch (Exception ex)
     {
         ex = new BusinessException(string.Format("[{0}]导航属性处理出错", EntityName), ex);
         return(HandleException <IQueryable <Employee> >(ex.Message, ex));
     }
 }