예제 #1
0
        public static async Task <List <T> > GetListFromController <T>(string controllerName, string controlerAction, ClaimsPrincipal user)
        {
            var client  = new BaseApiClient(controllerName + "/" + controlerAction + "/", user);
            var retList = await client.GetList <List <T> >();

            return(retList);
        }
예제 #2
0
        public static async Task <IQueryable <T> > GetQuerableFromController <T>(string controllerName, ClaimsPrincipal user)
        {
            try
            {
                var client  = new BaseApiClient(controllerName, user);
                var retList = await client.GetList <IQueryable <T> >();

                return(retList);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #3
0
        public static async Task <List <T> > GetFilteredListFromControllerAction <T>(string controllerName, int id, ClaimsPrincipal user)
        {
            try
            {
                var client  = new BaseApiClient(controllerName + "/" + id.ToString(), user);
                var retList = await client.GetList <List <T> >();

                return(retList);
            }
            catch (Exception)
            {
                throw;
            }
        }