コード例 #1
0
        public async Task <DataService <IEnumerable <T> > > ReadAsync <T>()
        {
            var type = typeof(T);

            try
            {
                var ret = await _adapter.Query <T>(null, DataHelper.StoreProcedure(type, DataHelper.ApiCRUD.Read), DataHelper.GetInstance(type));

                return(ret.FlushData());
            }
            catch (Exception ex)
            {
                return(ex.FatalException <IEnumerable <T> >());
            }
        }
コード例 #2
0
        public async Task <IEnumerable <UserInfo> > GetAllAsync(short type)
        {
            var dict = new Dictionary <string, object> {
                { "Type", type }
            };
            var result = await _adapter.Query <UserInfo>(dict, "usp_User_Read");

            return(result);
        }
コード例 #3
0
        public async Task <IEnumerable <Permission> > GetAllAsync()
        {
            var result = await _adapter.Query <Permission>(null, "usp_Permission_Read");

            return(result);
        }
コード例 #4
0
 public async Task <IEnumerable <ApplicationRole> > GetAllAsync()
 {
     return(await _adapter.Query <ApplicationRole>(null, "usp_Role_Read"));
 }
コード例 #5
0
 /// <summary>
 /// GetAll
 /// </summary>
 /// <returns></returns>
 public async Task <IEnumerable <Module> > ReadAsync()
 {
     return(await _adapter.Query <Module>(null, "usp_Module_Read"));
 }