private IIncludableQueryable <Payment, Payment> GetPaymentWithIncludesData(CloudCashDbContext _connection) => _connection.Payments.Include(x => x.Table).ThenInclude(x => x.TableInfo).ThenInclude(x => x.Category).Include(x => x.Customer).ThenInclude(x => x.Card).Include(x => x.Sells).ThenInclude(x => x.Table).ThenInclude(x => x.TableInfo).ThenInclude(x => x.Category).Include(x => x.Sells).ThenInclude(x => x.Product).ThenInclude(x => x.Category).Include(x => x.Sells).ThenInclude(x => x.Payment);
private IIncludableQueryable <Product, ProductCategory> GetProductWithIncludesData(CloudCashDbContext connection) => connection.Products.Include(x => x.Category);
public DbBase(IDbContextFactory cloudCashDbContextFactory) { _cloudCashDbContextFactory = cloudCashDbContextFactory; _connection = _cloudCashDbContextFactory.CreateDbContext(); }