public JsonResult Delete(int id)
        {
            // result return true  if delete successfully, else return false
            var result = AuthorDao.Delete(id) > 0;

            return(Json(result));
        }
 // DELETE: api/Autor/5
 public void Delete(long model)
 {
     using (IConnection connection = new ConnectionFactory())
     {
         connection.Open();
         IDao <Author> author = new AuthorDao(connection);
         author.Delete(model);
     }
 }
Esempio n. 3
0
 public static bool Delete(AuthorDto dto)
 {
     allNotDeletedAuthors.Remove(dto);
     return(AuthorDao.Delete(dto.AuthorId));
 }