public bool AuthenticatedUser(string userName, string passWord) { using (ExoContext ctx = new ExoContext()) { var result = ctx.UserProfiles.FirstOrDefault(u => u.UserName == userName && u.PassWord == passWord); return result != null; } }
public IEnumerable<JobHdr> GetJobs() { IEnumerable<JobHdr> result = new List<JobHdr>(); using (ExoContext ctx = new ExoContext()) { result = (from j in ctx.Jobs orderby j.Jobno descending select j).ToList(); } return result; }