コード例 #1
0
        public IHttpActionResult GetAll()
        {
            AppLogger.Instance.LogBegin(this.GetType().Name, System.Reflection.MethodInfo.GetCurrentMethod().Name);
            iRoleRepository = new OrgRoleRepository(this.Request.GetOwinContext().Get <AppDBContext>());
            ActionResult <List <OrgRoleDTO> > actionResult = iRoleRepository.GetAll();

            AppLogger.Instance.LogEnd(this.GetType().Name, System.Reflection.MethodInfo.GetCurrentMethod().Name);
            return(Ok(actionResult));
        }
コード例 #2
0
        public async Task <IEnumerable <OrganizationRoleDto> > GetAll(int role)
        {
            var querys = _orgRoleRepository.GetAll(it => (int)it.Role <= role).ProjectTo <OrganizationRoleDto>(_mapper.ConfigurationProvider);

            return(await querys.ToListAsync());
        }