Ejemplo n.º 1
0
        public async Task <IActionResult> GetGroupByOrg()
        {
            //var single = _kcStoreinRpt.FindBy(f => f.IsValid).GroupBy(f => f.OrgId).Select(f => f.ToList());
            var query = from m in _kcStoreinRpt.FindBy(f => f.IsValid)
                        group m by m.OrgId
                        into g
                        join o in _sysOrgRepository.FindBy(f => f.IsValid) on g.FirstOrDefault().OrgId equals o.Id
                        select new { Name = o.DeptName, Value = g.Count() };

            return(new OkObjectResult(query));
        }
Ejemplo n.º 2
0
 public IActionResult Get()
 {
     return(new OkObjectResult(_sysOrgRpt.FindBy(f => f.IsValid)));
 }