Newer
Older
Cohesion / Product.cs
@Derek Comartin Derek Comartin on 6 May 2021 446 bytes Tests with interface and delegates
using System.Threading.Tasks;

namespace Cohesion
{
    public class Product
    {
        public string Sku { get; set; }
    }

    public class ProductViewModel
    {
        public string Sku { get; set; }
    }

    public static class Extensions
    {
        public static ProductViewModel ToViewModel(this Product product)
        {
            return new()
            {
                Sku = product.Sku
            };
        }
    }
}