예제 #1
0
        public async Task <object> GetCustomerByGroup(string group)
        {
            //List<object> Groups = await customergroupRepository.GetCustomerGroupByGroup(group);
            //return Ok(Groups);
            List <CustomerGroup> list = await customergroupRepository.GetCustomerGroups();

            var customerilist = list.Where(item => item.Group == group).Select(item => item.Customer).Distinct();

            return(Ok(customerilist));
        }
예제 #2
0
        /// <summary>
        /// Lấy tất cả danh sách nhóm khách hàng.
        /// </summary>
        /// <returns>Danh sách nhóm khách hàng.</returns>
        public IEnumerable <CustomerGroup> GetCustomerGroups()
        {
            var customerGroups = _customerGroupRepository.GetCustomerGroups();

            return(customerGroups);
        }
예제 #3
0
        public async Task <object> GetCustomerGroup()
        {
            List <CustomerGroup> list = await customergroupRepository.GetCustomerGroups();

            return(Ok(list));
        }