문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top