23 lines
751 B
C#
23 lines
751 B
C#
using Data.Models;
|
|
using PluginsConventionLibrary.Plugins;
|
|
|
|
namespace PluginsConvention14.MyPlugin
|
|
{
|
|
public class MainPluginConventionElement : PluginsConventionElement
|
|
{
|
|
public string Name { get; set; }
|
|
public string ManufacturerName { get; set; }
|
|
public string DeliveryDate { get; set; }
|
|
public static List<MainPluginConventionElement> ConvertProductsToTableItems(List<Product> products)
|
|
{
|
|
return products.Select(p => new MainPluginConventionElement
|
|
{
|
|
Id = p.Id,
|
|
Name = p.Name,
|
|
ManufacturerName = p.ManufacturerName,
|
|
DeliveryDate = p.DeliveryDate.ToShortDateString()
|
|
}).ToList();
|
|
}
|
|
}
|
|
}
|