Ejemplo n.º 1
0
        public List <IUser> getUser(int Id)
        {
            DAL.NancyAppContext ctx   = new DAL.NancyAppContext();
            List <IUser>        users = (from u in ctx.User where u.Id == Id select u).ToList <IUser>();

            return(users);
        }
Ejemplo n.º 2
0
        public List <IUser> getAllUsers()
        {
            DAL.NancyAppContext ctx   = new DAL.NancyAppContext();
            List <IUser>        users = (from u in ctx.User select u).ToList <IUser> ();

            return(users);
        }
Ejemplo n.º 3
0
        public bool userExists(int Id)
        {
            DAL.NancyAppContext ctx = new DAL.NancyAppContext();

            if ((from u in ctx.User where u.Id == Id select u).ToList <IUser>().Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }