react-version #1

Merged
memartel merged 290 commits from react-version into main 2023-11-04 09:48:15 -04:00
2 changed files with 4 additions and 5 deletions
Showing only changes of commit e2b33cc7ac - Show all commits

View File

@@ -6,8 +6,7 @@ using Microsoft.Extensions.Logging;
namespace GrossesMitainesAPI.Controllers;
[ApiController]
[Route("[controller]")]
[ApiController, Route("[controller]")]
public class InventoryController : Controller {
private readonly ILogger<InventoryController> _logger;
private readonly InventoryContext _context;

View File

@@ -6,10 +6,10 @@ public class Product {
[Key]
public int Id { get; set; }
[Required, MaxLength(255)]
public string Title { get; set; } = "";
public string Title { get; set; } = "Erreur Aucun Objet";
[Required]
public string Description { get; set; } = "";
[Range(0, (double)decimal.MaxValue)] // Range qui prend pas les decimals!
public string Description { get; set; } = "Lorem Ipsum.";
[Range(0.01, (double)decimal.MaxValue)] // Range qui prend pas les decimals!
public decimal Price { get; set; } = 0;
public string? ImageData { get; set; } // Base64 en string pour le html.
}