/// <summary> /// Gets the benefit by identifier. /// </summary> /// <param name="benefitId">The benefit identifier.</param> /// <returns></returns> /// <exception cref="ApplicationException">GetBenefitById</exception> public IBenefit GetBenefitById(int benefitId) { try { using ( var dbContext = (HRMSEntities)this.dbContextFactory.GetDbContext(ObjectContextType.HRMS)) { var result = BenefitQueries.getBenefitById(dbContext, benefitId); return(result); } } catch (Exception e) { throw new ApplicationException("GetBenefitById ", e); } }