What is the proper way to show "Admin Tables" in my "Business Objects"? I have the following on my Address object.
public class Address
{
public int AddressID { get; set; }
public KeyValuePair<short, string> County { get; set; }
...
}
Now how would I instantiate this object, as far as the KeyValuePair<,>
properties go?
My guess is:
var myAddress = new Address { AddressID = 3, County = new KeyValuePair<short, string>(32, "La Crosse")}
EDIT
This is what I am replacing with the KeyValuePair<>
on the recommendations of another Programmer.
.....Address.cs.....
public County County { get; set; }
.....County.cs.....
public class County
{
public short? CountyID { get; set; }
public string CountyName { get; set; }
}
Is there a better way between the two or a third way that is even better?