Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
1.3 kB
1
Indexable
Never
Inventory Model


using System;
using System.Collections.Generic;

namespace Product_Stock_Maintenance.models;

public partial class Inventory
{
    public int ProductId { get; set; }

    public string ProductName { get; set; } = null!;

    public int Price { get; set; }

    public int Quantity { get; set; }

    public string? CreatedBy { get; set; }

    public DateOnly? CreatedDate { get; set; }

    public int? CategoryId { get; set; }

    public bool? IsDelete { get; set; }

    public string? ProductImage { get; set; }

    public virtual Categoryname? Category { get; set; }
}


in test case

            var products = new List<Inventory>{
                new Inventory { ProductId = 1 , ProductName = "Dell Lap"   , Price = 20000  , Quantity = 34 , CreatedBy = "pavan" , CreatedDate = "09-01-2024" , ProductImage = "image" , Category = 1},
                new Inventory { ProductId = 2 , ProductName = "Lays"       , Price = 20     , Quantity = 12 , CreatedBy = "pavan" , CreatedDate = "09-01-2024" , ProductImage = "image" , Category = 2},
                new Inventory { ProductId = 1 , ProductName = "Cooldrinks" , Price = 35     , Quantity = 44 , CreatedBy = "pavan",  CreatedDate = "09-01-2024" , ProductImage = "image" , Category = 2},
            };
Leave a Comment