public void createAddress(Address adr) { using (var db = new CardealerEF()) { // Create and save a new Blog db.Address.Add(adr); db.SaveChanges(); } }
public Customer(string name, string phone, string personalAddress, string city, string postCode, string country) { Name = name; Phone = phone; address = new Address(personalAddress,city,postCode,country); }
static void Main(string[] args) { Address adr = new Address("test","tesge","gsgr","gsrg"); CreateAdd cadd = new CreateAdd(); cadd.createAddress(adr); }