public async Task <string> GetUserRoleNameStr(string loginName, string loginPwd)
        {
            var user = (await base.Query(t => t.Username == loginName && t.Password == loginPwd)).FirstOrDefault();

            if (user != null)
            {
                var userRole = await _userRole.QueryById(user.Id);

                return(userRole.GetRolesName());
            }
            return("");
        }
Exemple #2
0
 public async Task <IEnumerable <T> > QueryById(Expression <Func <T, bool> > whereExpression)
 {
     return(await baseDal.QueryById(whereExpression));
 }