public IActionResult Post([FromBody] User user) { user.DateCreated = DateTime.UtcNow; db.Add(user); db.SaveChanges(); return(Ok()); }
public IActionResult Post([FromBody] UserFriend userFriend) { // if UserFriendID exists we immediately save to database userFriend.DateCreated = DateTime.UtcNow; db.Add(userFriend); db.SaveChanges(); return(Ok()); // otherwise we create a new user object and set active to false and save that UserFriendID // value that must be filled in for new non-existent user friend is phone number to validate that // that user friend joined on sign up }