コード例 #1
0
        public void LoginTest()
        {
            d.Login login = new d.Login
            {
                Name     = "Lin",
                Password = 1234
            };

            Assert.Equal("Lin", login.Name);
            Assert.Equal(1234, login.Password);
        }
コード例 #2
0
 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);
 }