Esempio n. 1
0
 /// <summary>
 /// Gets the name of the benefit by.
 /// </summary>
 /// <param name="benefitName">Name of the benefit.</param>
 /// <param name="companyId">The company identifier.</param>
 /// <returns></returns>
 /// <exception cref="System.ApplicationException">e</exception>
 public IBenefit GetBenefitByName(string benefitName, int companyId)
 {
     try
     {
         using (
             var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS))
         {
             var aRecord = BenefitQueries.getBenefitByName(dbContext, benefitName, companyId);
             return(aRecord);
         }
     }
     catch (Exception e)
     {
         throw new ApplicationException(nameof(e));
     }
 }