Exemplo n.º 1
0
        public void ReturnTrueIfDeleteStatementIsCorrect()
        {
            UserModel UserModel = new UserModel()
            {
                ID           = 1,
                UID          = "Testert1",
                FirstName    = "Test",
                LastName     = "Tester",
                EmailAddress = "*****@*****.**"
            };

            string UserDeleteStatement = MySQLDBStateless.GenerateStandardDeleteStatement(UserModel, nameof(UserModel.ID), UserModel.ID);

            Assert.AreEqual($"DELETE FROM {UserModel.TableName()} WHERE usrID = 1",
                            UserDeleteStatement);
        }
Exemplo n.º 2
0
 public void Delete()
 {
     _MySQLDBStateless.ExecNonQuery(MySQLDBStateless.GenerateStandardDeleteStatement(this, nameof(this.ID), this.ID));
 }