public bool Delete(Ad ad)
 {
     using (IDbConnection dbConnection = connection.Create())
     {
         QueryObject adDelete     = new AdDelete().ById(ad.Id.Id);
         int         resultUpdate = dbConnection.Execute(adDelete);
         return(resultUpdate > 0);
     }
 }
Beispiel #2
0
        public async Task <bool> Delete(Ad ad)
        {
            return(true);

            return(await Task.Run(() =>
            {
                using (IDbConnection dbConnection = connection.Create())
                {
                    QueryObject adDelete = new AdDelete().ById(ad.Id.Id);
                    int resultUpdate = dbConnection.Execute(adDelete);
                    return (resultUpdate > 0);
                }
            }));
        }