コード例 #1
0
        /// <summary>
        /// Gets the user role collections.
        /// </summary>
        /// <param name="username">The username.</param>
        /// <returns></returns>
        /// <exception cref="ApplicationException">Repository GetUserRoleIdCollection</exception>
        public IList <IUserRolesModel> GetUserRoleCollections()
        {
            try
            {
                using (
                    var dbContext = (PitalyticsEntities)dbContextFactory.GetDbContext())
                {
                    var list = AccountQueries.GetUserRolesCollection(dbContext).ToList();

                    return(list);
                }
            }
            catch (Exception e)
            {
                throw new ApplicationException("Repository GetUserRolesCollection", e);
            }
        }