Example #1
0
 /// <summary>
 /// Gets the user by company identifier.
 /// </summary>
 /// <param name="companyId">The company identifier.</param>
 /// <returns></returns>
 /// <exception cref="ApplicationException">Repository GetUserByCompanyID</exception>
 public IUser GetUserByCompanyID(string companyId)
 {
     try
     {
         using (
             var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS))
         {
             var aRecord = UsersQueries.getUserByEmail(dbContext, companyId);
             return(aRecord);
         }
     }
     catch (Exception e)
     {
         throw new ApplicationException("Repository GetUserByCompanyID", e);
     }
 }