public IActionResult Login(string userName, string password) { User user = dataAccess.Login(userName, password); if (user == null) { return(NotFound()); } return(new ObjectResult(user)); }
public IActionResult Create([FromBody] User user) { User newuser = dataAccess.Create(user); return(new ObjectResult(newuser)); }
public User GetUser(int id) { User user = dataAccess.GetUsers().FirstOrDefault(); return(user); }