Question

I'm new in MVC an have Create internet App. using MVC 4 i Found there is by default member Tables and connection string ready for it

i need to add another Table it's name is [Area] and will be like this in Model Class

    public partial class Area
    {
      public int AreaID { get; set; }
      public string AreaName { get; set; }
      public Nullable<double> longitude { get; set; }
      public Nullable<double> latitude { get; set; }
      public Nullable<int> UserId { get; set; }

    public virtual UserProfile Users{ get; set; }
    }

but something goining wrong i don't know

Should i create table in Sql manager manually instead or something else ? because i want to make relationship between these two tables

Was it helpful?

Solution

yes, create a new table and connect the two tables using username in the membership.user table. make sure any new user you create using membership, you create same user in the new table as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top