ef core
This commit is contained in:
19
MySolution/InventoryManagement/Components/Product.cs
Normal file
19
MySolution/InventoryManagement/Components/Product.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace InventoryManagement.Components
|
||||
{
|
||||
[PrimaryKey(nameof(Id))]
|
||||
[Index(nameof(Name), IsUnique = true)]
|
||||
internal class Product
|
||||
{
|
||||
public int Id { get; }
|
||||
public string Name { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user