11.1.4.2 Creating the Edit View; Listing 11-7 Using Model Metadata in the Product.cs File

This commit is contained in:
Jason Zhu 2021-09-23 12:54:55 +10:00
parent 436f78cf71
commit 911ab9f5c8

View File

@ -1,15 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
namespace SportsStore.Domain.Entities
{
public class Product
{
[HiddenInput(DisplayValue = false)]
public int ProductID { get; set; }
public string Name { get; set; }
[DataType(DataType.MultilineText)]
public string Description { get; set; }
public decimal Price { get; set; }
public string Category { get; set; }