Click here to Skip to main content
14,836,862 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all
I have a database with no constreains and no relations. This is just a converted flat-file database and must not be touched.

I nead to create entities with relations and tryed this:

public class customer
    [Key, Column("CustoemrID")]
    public int Id{get;set;}

    public string Name{get;set;}

    public int Zip{get;set;}

    public ZipCode{get;set;}
public class ZipCode
    [Key, Column("ZipCode")]
    public int ZipCode{get;set;}
    public string Name{get;set;}

I get errors on this and wander if there are some other ways to do this

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900