/// <summary> /// Gets the admin by user identifier. /// </summary> /// <param name="userId">The user identifier.</param> /// <returns></returns> /// <exception cref="ApplicationException">Repository GetAdminByuserId</exception> public IUserRegistration GetAdminByUserId(int userId) { try { using ( var dbContext = (PitalyticsEntities)dbContextFactory.GetDbContext()) { var aRecord = AccountQueries.GetAdminByUserId(dbContext, userId); return(aRecord); } } catch (Exception e) { throw new ApplicationException("Repository GetAdminByuserId", e); } }