Example #1
0
        // read Role of user from database
        protected virtual void EnsureRoles()
        {
            using (var context = new ServiceQualityControlEntities())
            {
                var roles = context.UserRoleInfos.ToList();

                foreach (var userRoleInfo in roles)
                {
                      _roles.Add(userRoleInfo.Role);
                }
            }
        }
Example #2
0
 public UserModel()
 {
     Context = new ServiceQualityControlEntities();
 }