public void Add() { UserBDContext context = new UserBDContext(); context.Users.Add(this); context.SaveChanges(); }
public bool CheckID() { UserBDContext context = new UserBDContext(); var check = context.Users.Where(u => u.UserName.Equals(this.UserName)).ToList(); if (check.Count() > 0) { return(false); } else { return(true); } }
public bool CheckEmail() { UserBDContext context = new UserBDContext(); var check = context.Users.Where(u => u.Email.Equals(this.Email)).ToList(); if (check.Count > 0) { return(false); } else { return(true); } }
public bool Login() { UserBDContext context = new UserBDContext(); var data = context.Users.Where(u => u.UserName.Equals(this.UserName) && u.Password.Equals(this.Password)).ToList(); if (data.Count() > 0) { return(false); } else { return(true); } }