public partial class Contact { public Contact() { this.Emails1 = new HashSet<Email>(); this.Phones1 = new HashSet<Phone>(); this.Tags1 = new HashSet<Tag>(); } public int id { get; set; } public string firstname { get; set; } public string lastname { get; set; } public string address { get; set; } public string city { get; set; } public Nullable<byte> bookmarked { get; set; } public string notes { get; set; } public virtual ICollection<Email> Emails1 { get; set; } public virtual ICollection<Phone> Phones1 { get; set; } public virtual ICollection<Tag> Tags1 { get; set; } } }
public string AddContact(Contact contact) { if (contact != null) { db.Contacts.Add(contact); db.SaveChanges(); return "Contact Added"; } else { return "Invalid Record"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)