15 lines
432 B
C#
15 lines
432 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace PF3.Models;
|
|
|
|
[PrimaryKey(nameof(ProductId), nameof(SupplierId))]
|
|
public class Price
|
|
{
|
|
[Required] public int ProductId { get; set; }
|
|
[Required] public int SupplierId { get; set; }
|
|
[Required] public decimal SellingPrice { get; set; }
|
|
|
|
public Product? Product { get; set; }
|
|
public Supplier? Supplier { get; set; }
|
|
} |