public static void AddContacts(DTO.ContactDTO Contacts) { using (MoveilEntities db = new MoveilEntities()) { db.NewContacts.Add(CONVERTERES.ContactsConverters.ConvertContactsToDAL(Contacts)); db.SaveChanges(); } }
public static NewContact ConvertContactsToDAL(DTO.ContactDTO Contacts) { return(new NewContact { ContactName = Contacts.ContactName, PhoneNumber = Contacts.PhoneNumber, Email = Contacts.Email, Aboutme = Contacts.Aboutme, Country = Contacts.Country, CityCode = Contacts.CityCode }); }