public List <CompanyVM> GetAllCompanys(string userId)
 {
     try
     {
         return(genericRepository.Get(e => e.UserId == userId).Select(m => new CompanyVM()
         {
             CompanyDescription = m.CompanyDescription,
             CompanyName = m.CompanyName,
             Id = m.Id,
             UserId = m.UserId
         }).ToList());
     }
     catch (Exception ex)
     {
         //logging an exception
         return(null);
     }
 }
 public async Task <List <ConsultantVM> > GetAllConsultants(string userId)
 {
     try
     {
         return(await genericRepository.Get(e => e.UserId == userId).Select(m => new ConsultantVM()
         {
             Id = m.Id,
             FirstName = m.FirstName,
             LastName = m.LastName,
             Email = m.Email,
             IsActive = m.IsActive,
             IsAdmin = m.IsAdmin,
             CompanyId = m.CompanyId,
             CompanyName = m.Company.CompanyName
         }).ToListAsync());
     }
     catch (Exception ex)
     {
         //logging an exception
         return(null);
     }
 }