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); }
public List <IUser> getAllUsers() { DAL.NancyAppContext ctx = new DAL.NancyAppContext(); List <IUser> users = (from u in ctx.User select u).ToList <IUser> (); return(users); }
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); } }