public responseCls loginForm(loginCls expositions) { var emp = from e in entities.Logins where e.userName == expositions.userName && e.password == expositions.password select e; responseCls res = new responseCls(); if (emp.Count() > 0) { res.status = 200; res.success = "successfully logged in"; var firstOne = emp.First(); dataCls d = new dataCls(); d.userName = firstOne.userName; res.value = d; } else { res.status = 400; res.success = "invalid username or password"; } return(res); }
public responseCls loginFormOption(loginCls expositions) { responseCls res = new responseCls(); res.status = 400; res.success = "successfully sign up"; return(res); }