Example #1
0
        public int AddContact(ContactModel contact)
        {
            SqlConnectionDB dataBase = new SqlConnectionDB("SqlConnection");

            ContactsTable tableData = new ContactsTable();

            Mapper.Map(contact, tableData);

            return((int)dataBase.Insert(tableName: "dbo.ContactsTable", primaryKeyName: "Id", autoIncrement: false, poco: tableData));
        }