Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:20:56+00:00 2026-06-13T04:20:56+00:00

I have a User table with foreign key pointing to the Address Table. public

  • 0

I have a User table with foreign key pointing to the Address Table.

public User()
{

}

public int UserID { get; set; }
public string ReferenceNumber { get; set; }
public string FirstName { get; set; }
public string SecondName { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public bool IsEnabled { get; set; }
public string TelephoneNumber { get; set; }
public string FaxNumber { get; set; }
public bool IsAccountant { get; set; }
public int AddressID { get; set; }
public virtual Address Address { get; set; }
}

That’s working fine in the view i.e. the user is asked to select AddressID when creating new ‘User’ record… However, what can I do if the Address record does not exist yet (apart from creating it first) is it possible to somehow point them to the Address View, force them to create Address first and pass the primary key back or put both views on the same page? Many thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:20:57+00:00Added an answer on June 13, 2026 at 4:20 am

    Create them in the same transaction (and on the same page). E.g:

    Details:
    --------
    First Name:  [____]
    Second Name: [____]
    etc.
    
    Address:
    --------
    Line 1:      [____]
    Line 2:      [____]
    City:        [____]
    State:       [____]
    Country:     [____]
    etc.     
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a User table which has a PrivilegeId foreign key points to a
I have a table named user. This table has a foreign key to a
I have a User table which has a foreign key to the UserType table.
Suppose I have a user table that creates strong relationships (Enforce Foreign Key Constraint)
I have a user table like this FIRSTNAME | LASTNAME | ID | --------------------------------
In SQL Server 2008 I have a user table like the following: Userid Username
I have a user table with userid and username columns, and both are unique.
I have an existing InnoDB table which already has foreign keys pointing to different
I need to have one table in which i can set user preferences I
Agent: agent_id (primary key) User: f_id (foreign key) type I have created relation in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.