Esempio n. 1
0
        public void SetUp()
        {
            base.SetUp();

            _sessionFactory = ApplicationContext.Current["NHibernateSessionFactory"] as ISessionFactory;

            _audienceApplicationService = ApplicationContext.Current["AudienceApplicationService"] as IAudienceApplicationService;

            _userApplicationService = ApplicationContext.Current["UserApplicationService"] as IUserApplicationService;

            _roleApplicationService = ApplicationContext.Current["RoleApplicationService"] as IRoleApplicationService;

            _permissionApplicationService = ApplicationContext.Current["PermissionApplicationService"] as IPermissionApplicationService;

            _rolePermissionApplicationService = ApplicationContext.Current["RolePermissionApplicationService"] as IRolePermissionApplicationService;
        }
Esempio n. 2
0
 public static IEnumerable <IRolePermissionState> GetByProperty <TPropertyType>(this IRolePermissionApplicationService applicationService,
                                                                                System.Linq.Expressions.Expression <Func <IRolePermissionState, TPropertyType> > propertySelector,
                                                                                TPropertyType propertyValue, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue)
 {
     return(applicationService.GetByProperty(ReflectUtils.GetPropertyName <IRolePermissionState, TPropertyType>(propertySelector), propertyValue, orders, firstResult, maxResults));
 }