public async Task <IActionResult> Delete(ObjectId objectId)
        {
            if (objectId == ObjectId.Empty)
            {
                return(BadRequest());
            }
            await _writerService.Delete(objectId);

            return(Ok());
        }
        public IActionResult Delete(Writer writer)
        {
            var result = _writerService.Delete(writer);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
 public ActionResult DeleteWriter(int id)
 {
     writerManager.Delete(id);
     return(RedirectToAction("Index"));
 }