Skip to content
Loading
How do I combine 2 tables into 1 datagridview?
  • Sachin Singh
    use group join linq query , if you already have list of groups and list of passwords returning method in code behind.
    1. var joinRes = GetGroupList().GroupJoin(getPasswordList(), x => x.Id, y => y.group_no, (c, SG) => new   
    2.             {  
    3.               GroupName=c.Name,  
    4.                   
    5.                PasswordCount= SG.Count()  
    6.             });  
    7.   
    8.             return joinRes.ToList(); 
     
    0