public List <XhUser> Get(XhUser entity) { using (XHBaseContext db = new XHBaseContext()) { return(db.XhUser.Where(p => p.UserId == entity.UserId && p.UserPassword == entity.UserPassword).ToList()); } }
public int Add(XhUser entity) { using (XHBaseContext db = new XHBaseContext()) { db.XhUser.Add(entity); return(db.SaveChanges()); } }