Add transaction list
This commit is contained in:
@@ -14,6 +14,8 @@ namespace InventoryTraker.Web.Models
|
||||
public string Name { get; set; }
|
||||
public int UnitsPerCase { get; set; }
|
||||
public string ContainerType { get; set; }
|
||||
public DateTime ExpirationDate { get; set; }
|
||||
public DateTime AddedDate { get; set; }
|
||||
|
||||
[Required]
|
||||
public int AddedQuantity { get; set; }
|
||||
@@ -37,6 +39,10 @@ namespace InventoryTraker.Web.Models
|
||||
configuration.CreateMap<Transaction, TransactionViewModel>()
|
||||
.ForMember(d => d.Name,
|
||||
opt => opt.MapFrom(s => s.Inventory.InventoryType.Name))
|
||||
.ForMember(d => d.ExpirationDate,
|
||||
opt => opt.MapFrom(s => s.Inventory.ExpirationDate))
|
||||
.ForMember(d => d.AddedDate,
|
||||
opt => opt.MapFrom(s => s.Inventory.AddedDate))
|
||||
.ForMember(d => d.UnitsPerCase,
|
||||
opt => opt.MapFrom(s => s.Inventory.InventoryType.UnitsPerCase))
|
||||
.ForMember(d => d.ContainerType,
|
||||
|
||||
Reference in New Issue
Block a user