react-version #1

Merged
memartel_loc merged 290 commits from react-version into main 2023-11-04 09:48:15 -04:00
Showing only changes of commit 84e6bb9bc3 - Show all commits

View File

@ -186,4 +186,14 @@ public class ProductController : Controller {
_logger.LogError(8, e.Message);
}
}
[HttpDelete(Name = "Product")]
public void DeleteProduct(int id) {
try {
_context.Products.Remove(_context.Products.Where(x => x.Id == id).First());
_context.SaveChanges();
} catch (Exception e) {
_logger.LogError(8, e.Message);
}
}
}