forum

Home / DeveloperSection / Forums / How to use one composite key in a class to another class in model of ASP.NET MVC4 using code first approach

How to use one composite key in a class to another class in model of ASP.NET MVC4 using code first approach

Anupam Mishra121002-Feb-2016
Hi Everyone,
I have created a class in a model such as follows:
 public class Locations
    { [Key]
        public int LocationID { get; set; }
        public string Location { get; set; }
    }

I want to create another class schedule in a model  and call the above class primary key fields 'ID' in my schedule class

.Please can anyone give me a solution.

Thank you.


Updated on 02-Feb-2016

Can you answer this question?


Answer

1 Answers

Liked By