Exemplo n.º 1
0
        public async Task <List <Business> > GetBusinesses(int senderId)
        {
            //var businesses = _businessRepository.Query().Include(b => b.BusinessAddress).Include(s => s.Sender).Include(p => p.Periods).Where(b => b.IsDeleted == false);
            var businesses = await _businessRepository.GetAllIncluding(
                b => b.BusinessAddress,
                s => s.Sender,
                p => p.Periods).Where(b => b.IsDeleted == false && b.SenderId == senderId).ToListAsync();

            return(businesses);
        }