public bool Create_User(ULogin l) { try { dbContext.ULogins.Add(l); dbContext.SaveChanges(); return(true); } catch (Exception e) { return(false); } }
public ULogin Authenticate(String uid, String pwd) { var credentials = (dbContext.ULogins.Where(a => (a.user_ID.Equals(uid)) && (a.user_Pwd.Equals(pwd)))).FirstOrDefault(); if (credentials != null) { ULogin l = new ULogin(); l = (ULogin)credentials; return(l); } else { return(null); } }