I have a database with 2 tables :
- Personal : ID (PK), Name, Code (FK), Birthdate
- Social : Code (PK), Address
When I add a ADO.NET Entity Data Model name Model to my project. The Model.Context.tt has only Personals and Socials Dbset<>, so i can only choose 2 tables by using query :
string sql = "SELECT VALUE p FROM SqlEntities.Personals AS p"
SqlEntities is my entity name, so the thing i want is how to make a column in table become the Dbset<>, maybe I don't understand much but how i can use the anonymous type like :
stringsql = "SELECT p.ID, p.Name FROM SqlEntities.Personals AS p"