Exemplo n.º 1
0
        public HttpResponseMessage Delete(string entity, int id)
        {
            DataRow row = null;

            if (CheckEntityForEdit(entity))
            {
                row = TableManager.SelectRowByPrimaryKey(entity.ToUpper(), id);
                if (row != null)
                {
                    BeforeDelete(row, id);
                    TableManager.DeleteRow(row.Table, row);
                    return(CreateResponse(HttpStatusCode.OK));
                }
            }
            return(CreateResponse(HttpStatusCode.NotFound));
        }