public void LoginTest() { d.Login login = new d.Login { Name = "Lin", Password = 1234 }; Assert.Equal("Lin", login.Name); Assert.Equal(1234, login.Password); }
public int Login(l.Login login) { try { d.Login pass = dbcontext.Login.Where(p => p.Name == login.Name && p.Password == login.Password).First(); } catch (InvalidOperationException ex) { logger.Error("(Repo.Login)Invalid Name and/or Password"); return(0); } return(1); }