public ActionResult <PersonFaces> Add(PersonFaces faces) { var personFaces = _services.Add(faces); if (personFaces == null) { return(NotFound()); } return(personFaces); }
public PersonFaces Add(PersonFaces faces) { foreach (var Name in _faces) { if (faces.Name.Equals(Name)) { return(null); } } _faces.Add(faces.Name, faces); return(faces); }
public string Login(PersonFaces faces) { string answer = "user not found"; foreach (var PersonFaces in _faces) { if (faces.Name.Equals(PersonFaces.Value.Name)) { answer = "Incorrect password"; if (faces.Password.Equals(PersonFaces.Value.Password)) { answer = "Login succesful"; } } } return(answer); }
public ActionResult <string> Login(PersonFaces faces) { var answer = _services.Login(faces); return(answer); }