Ejemplo n.º 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> >());
            }
        }
Ejemplo n.º 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);
        }
        public async Task <IEnumerable <Permission> > GetAllAsync()
        {
            var result = await _adapter.Query <Permission>(null, "usp_Permission_Read");

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